Open josephernest opened 8 years ago
HI, i had the same issues, as is wanted to get YYMMDD-HHMM output. I set
validateOnBlur: false
and now the text stays the same after clicking otuside the input box.
Hope this helps, at least it works for me.
then it works for me.
I also had this issue and it was resolved by implementing @skainz solution.
My code was:
$(document).ready(function() {
$('#date_and_time').datetimepicker({
format:'d / m / y @ g:i A',
formatTime: 'g:i A',
theme: 'dark',
validateOnBlur: false
});
});
UPDATE:
Hmm, unfortunately, when clicking on the input again to trigger the calendar, I can see that the calendar has reset to a different month, date and year.
For example, if I initially select 01 / 06 / 16 @ 2:35 PM
, then click outside of the input, then click inside the input again, the calendar pops up with this month and year selected:
31 / 12 / 99 @ 6:00 AM
Any ideas?
jquery-2.2.4.min.js
UPDATE 2:
Error doesn't occur when using jQuery DateTimePicker plugin v2.4.1
, and validateOnBlur: false
is not required.
@oshihirii did you reslove the error because i am still facing this error
Is this issue resolved ? I'm still facing the same error...
Got the solution, check the link [https://github.com/uxsolutions/bootstrap-datepicker/issues/1291]
The way I solved is as below i.e. using forceParse:false
$('.date-time-picker').datetimepicker({ format: 'yyyy-mm-dd hh:ii', forceParse: false });
I was also having this issue with latest versions, and I was able to solve it with validateOnBlue: false
.
I was having the same issue and fixed the same using validateOnBlur: false
I can still see the issue even with validateOnBlur: false
.
Try this (live demo here): Clicking outside of datetimepicker reinitializes the date to Sunday 31 December 1899. How to solve this?