dateToStr

creates a new date formatting method

function dateToStr(string|function format, [boolean utc] );
formatstring|functiona date format
utcbooleanconvert local time to a string in UTC format
functiona formatting function

Example

var myformat = webix.Date.dateToStr("%m - %d");
var text = myformat(new Date());
 
// or directly
{
    view:"datepicker",
    format: webix.Date.dateToStr("%d/%m/%y")
}

Related samples

See also
Back to top