Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(calendar): "get date" can return formatted date
$('.ui.calendar').calendar('get date'); $('.ui.calendar').calendar('get focusDate'); $('.ui.calendar').calendar('get startDate'); $('.ui.calendar').calendar('get endDate'); could so far only return a Javascript Date object. Now, given a format argument, they return a formatted date string: $('.ui.calendar').calendar('get date', "YYYY-MM-DD"); $('.ui.calendar').calendar('get focusDate', "YYYY-MM-DD"); $('.ui.calendar').calendar('get startDate', "YYYY-MM-DD"); $('.ui.calendar').calendar('get endDate', "YYYY-MM-DD"); The format string is passed to the existing formatter. This is backward compatible as the default behaviour does not change. It makes it convenient for developers to get exactly what they need when they need it.
- Loading branch information