:
$(document).ready(function() {
var myFormatter = {
parseDate: function(vDate, vFormat) {
return moment(vDate, vFormat).toDate();
},
guessDate: function(vDateStr, vFormat){
return moment(vDateStr, vFormat).toDate();
},
parseFormat: function(vChar, vDate){
return vDate; // date string (I guess)
},
formatDate: function(vChar, vDate) {
return moment(vChar).format(vDate);
},
};
jQuery.datetimepicker.**setDateFormatter**(myFormatter);
jQuery('#datetimepicker').datetimepicker({
timepicker: true,
// 'd/m/y'format is requared for datetimepicker days HIGHLIGHT function to work!!!
//Date, time formating: http://php.net/manual/en/function.date.php
step: 15,
/*
// momentJs formating
format: "d/m/Y H:i:s",
formatTime: "H:i",
formatDate: "d/m/Y",
*/
format: "DD/MM/YYYY H:mm:ss",
formatTime: 'H:mm',
formatDate: 'DD/MM/YYYY', //I need to use this format, but it works only when using "d/m/Y" - so somewhere the php date formater is still used..
highlightedDates: [
"01/09/2016,,xdsoft_highlighted_mint",
"02/09/2016,,xdsoft_highlighted_mint",
"03/09/2016,,xdsoft_highlighted_mint",
"06.09/2016",
"07.09.2016",
"08.09.2016",
"12.09.2016,Christmas Eve,xdsoft_highlighted_mint",
"13.09.2016,Christmas Day,xdsoft_highlighted_mint",
"14.09.2016,Christmas Day,xdsoft_highlighted_mint",
"26.09.2016,,xdsoft_highlighted_mint"
]
});
There is working plunker example
主な問題はあるが、私の場合ですが... browserify /一気モジュール連結され、そのDateTimePickerのはjqueryの下に定義されていない...
ので、 WebPackに建物を変更しようとしています....