farhoudshapouran / react-native-ui-datepicker

Customizable React Native 📅 DatePicker component for Android, iOS, and Web. It includes single, range and multiple modes and supports different locales.
https://farhoudshapouran.github.io/react-native-ui-datepicker/
MIT License
272 stars 28 forks source link

Picks 1 day before #75

Open tr2cky opened 3 months ago

tr2cky commented 3 months ago

From 2016 and backwards when I pick a date, chosen date becomes the day before I picked. For instance when I pick 8/31/2016 from picker, chosen date becomes 8/30/2016. No issues for 2017 and later years.

Senninseyi commented 1 month ago

@tr2cky any update on this yet

Senninseyi commented 1 month ago

<DateTimePicker mode="single" date={dayjs(date).subtract(1, 'day')} onChange={params => { const newdate = ${dayjs(params.date).add(1, 'day')}; setDate(newdate); }} selectedItemColor="red" />

    This was how i was able to bypass mine
farhoudshapouran commented 1 month ago

I cannot find any issue about the selected date, can you provide your example code?

scrnli_5_29_2024_5-45-18 PM