I am using flatpickr in order to set a date,
onChange: function(selectedDates, dateStr, instance) {
var myDate = selectedDates[0];
First I am tracing selecteDate[0] and gives me a string
Thu Dec 20 2018 00:00:00 GMT-0500 (GMT-05:00)
Then I am tracing myDate and seems that is been converted to GMT+0000 ISO string.
2018-12-20T05:00:00.000Z
So my question is where does the flatpickr picks the GMT-0500 from? Is it possible to change it?
Unfortunately, it doesn't seem to be possible to do that (currently). https://github.com/flatpickr/flatpickr/issues/1532
Apparently, flatpickr uses, by default, the timezone of the computer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With