Semantic-UI-Calendar
Semantic-UI-Calendar copied to clipboard
Changing the datetime
How can i change to format yyyy-MM-ddThh:mm?
`ampm: false,
monthFirst: false,
formatter: {
date: function (date, settings) {
if (!date) return '';
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
var hour = date.getHours();
var minu = date.getMinutes();
return year + '-' + month + '-' + day + 'T' + hour + ':' + minu;
}
},
type: 'datetime',`
Output: 2017-12-19T13:15 13:15
So on the end is the time again...
Have the same issue here ! Seems the date is setting once the day is selected, and then resetting once hour is selected. It result displaying the hours two times ...
Okkkkkkk, it's because you should use datetime
instead of date
in the formatter
So it should look to something like
monthFirst: false,
formatter: {
datetime: function (date, settings) {
etc....
should be close then