sbmdkl / nepali-datepicker-reactjs

20 stars 16 forks source link

onChange event triggers on first render which sets a current date #9

Open narendrachettri opened 3 years ago

narendrachettri commented 3 years ago

nepali calendar error

here you can see even i haven't select a value from calendar it's printing the current bsDate on first render. either put the date value onClick rather than onChange. If it's rendering by default put currentDate blank by default

sbmdkl commented 3 years ago

Hi @narendrachettri, I got your issue, previously I thought you only don't need value in your input at initial. I didn't think about the initial value from onChange. I will update you once the changes are done.

narendrachettri commented 3 years ago

also check the default date if i want to put a default value initially on calendar