henninghall / react-native-date-picker

React Native Date Picker is datetime picker for Android and iOS. It includes date, time and datetime picker modes. The datepicker is customizable and is supporting different languages. It's written with native code to achieve the best possible look, feel and performance.
MIT License
2.21k stars 338 forks source link

'Today' date is not rendered #842

Closed zoltantothcom closed 2 months ago

zoltantothcom commented 2 months ago

Describe the bug The Today date is not being displayed, despite calculated correctly. The prev/next values in spinner are correct (screenshot), considering the expected date for the picker is Fri Jul 12 2:45 PM

Expected behavior Today date and time being properly shown.

Code

<DatePicker
  date={scheduleDate} // DateTime.now().toJSDate()
  onDateChange={setScheduleDate}
  minuteInterval={DATE_PICKER_MINUTE_INTERVAL} // 15
  minimumDate={minimumDate}
  maximumDate={maximumDate}
  locale={locale}
  timeZoneOffsetInMinutes={DateTime.fromJSDate(scheduleDate).offset}
  theme="light"
/>

Smartphone (please complete the following information):

Screenshot 2024-07-12 at 2 13 21 PM