0

can anybody help me with Safari and ReactJs day picker. It just does not work under iOS...I can't set dates as pre-selected.

I need day picker where I can set dates as marked, and the get 'selected date' onChage event.

I tried with react-datepicker as well, but it seems not working either.

Thanks for any help.

michal
  • 71
  • 1
  • 8

1 Answers1

0

So the problem was with Safari and DateTime format, NOT a react-day-picker.

For Safari browser, format of date 'yyyy-MM-dd' is an error.

Walkaround, use replace(/-/g, "/"):

new Date(date.replace(/-/g, "/"))

Regards MichaƂ

michal
  • 71
  • 1
  • 8