I found an unhandled exception if I try to set locale on an empty date picker
jQuery('#myDTP').datetimepicker('locale', 'it');
This is the code that throw the error
this.actualFormat = format.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput) {
return (self.isInitFormatting && self._options.date === null ? self.getMoment() : self._dates[0]).localeData().longDateFormat(formatInput) || formatInput; //todo taking the first date should be ok
});
it could be simply solved adding the ?
(self.isInitFormatting && self._options.date === null ? self.getMoment() : self._dates[0])**?**.localeData()
I found an unhandled exception if I try to set locale on an empty date picker jQuery('#myDTP').datetimepicker('locale', 'it');
This is the code that throw the error
it could be simply solved adding the ?
(self.isInitFormatting && self._options.date === null ? self.getMoment() : self._dates[0])**?**.localeData()