shahabyazdi / react-multi-date-picker

a simple React datepicker component for working with gregorian, persian, arabic and indian calendars
https://shahabyazdi.github.io/react-multi-date-picker/
MIT License
766 stars 90 forks source link

analog time picker onchange causes rerender and ui problem #262

Open arash-hk opened 6 months ago

arash-hk commented 6 months ago

hi every one hope you have a greate time! everything is good with react multi date picker but when im going to setstate my new date with onchange function, changing time causes rerender of my calender ui and thats not feel good! can you please help me with this issu? thanks!

<DatePicker onChange={(e) => { setStartDate(e); }} value={startDate} plugins={[<AnalogTimePicker hideSeconds />]} format="YYYY/MM/DD HH:mm" inputClass="custom_date_picker" containerClassName="custom_date_picker_container" placeholder="Enter start date" animations={[ transition({ from: 35, transition: "all 400ms cubic-bezier(0.335, 0.010, 0.030, 1.360)", }), ]} /> is there any problem with set state or what can i do to prevent rerendering of my calender ui ?