dateToStr of Date, Methods Webix Docs

creates a new date formatting method

function dateToStr(string|function format, [boolean utc] );

string|functiona date format utc
booleanconvert 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