HosseinShabani / react-native-modern-datepicker

A customizable calendar, time & month picker for React Native (including Persian Jalaali calendar & locale)
MIT License
578 stars 164 forks source link

Bad Date Selection #48

Open M8TiX opened 3 years ago

M8TiX commented 3 years ago

Wrong and bad date selection, happening when try to select 02/Farvardin/1400 ( 02/01/1400). Both first and second days will be selected upon touching "second of Farvardin 1400" But it is not the only place last year I had same issue with another date!

1.Go for Persian date 2.selected={getFormatedDate(new Date(), 'jYYYY/jMM/jDD')}

  1. You will see the error
    1. The wrong date will return for 02/farvardin/1400
    • Device: Android "react": "16.13.1", "react-native": "0.63.4", "react-native-modern-datepicker": "^1.0.0-beta.91",

Screenshot_1616952225

ghorbani-m commented 3 years ago

I have the same issue on 1400-01-02 date in Persian mode. I think the problem is the daylight saving time at that date.

image

sam9010 commented 3 years ago

@M8TiX How did you put close in this? can i see sample your code?

M8TiX commented 3 years ago

@M8TiX How did you put close in this? can i see sample your code?

@sam9010 What do you mean by "close" ? if you mean the close icon, then it is separated from the calendar materials, something like a custom FontIcon and an onPress method, all in the children part of an Overlay from react-native-elements.

sam9010 commented 3 years ago

@M8TiX ok thanks i mean the close icon, i think it is a option of the calendar

mdbaniani commented 3 years ago

same problem here. any workaround? the calendar is impossible to use without a fix.

MshHooman commented 3 years ago

same