9

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?

Petran
  • 7,677
  • 22
  • 65
  • 104

1 Answers1

4

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.

GB5
  • 469
  • 1
  • 5
  • 16