HosseinShabani / react-native-modern-datepicker

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

Current and selected not working in mode "time" #134

Open devluxca opened 1 year ago

devluxca commented 1 year ago

Describe the bug When the calendar is in mode "time", the current prop not working and I can't set default time to datepicker.

To Reproduce

// setTime is an useState

<DatePicker 
    mode="time" 
    options={{
            backgroundColor: '#f9f9f9',
            textHeaderColor: '#8ECA74',
            mainColor: '#8ECA74',
            selectedTextColor: '#fff'
          }} 
     current={'2023-01-29 08:00'} 
     selected={'2023-01-29 08:00'} 
     onTimeChange={selectedTime => setTime(selectedTime)} 
/>

Expected behavior Default hour in 08 and minutes in 00.

Shperung commented 1 year ago

I have same issue

arifrdon commented 1 year ago

same issue here