Hide the DatePicker on button click

108 views
Skip to first unread message

Oscar Morrison

unread,
Dec 11, 2015, 5:41:54 PM12/11/15
to bootstrap-datepicker
I am using a calendar icon in a input box to open the bootstrap datepicker (1.4). 
I want to be able to simply close the datepicker when re-clicking this icon again. 

I have tried to set a flag in the datepicker show and hide event, and then check if the datepicker is open to change the behavior of the button. 
But I have found that the hide event fires before the on click event and the datepicker hides then immediately re-shows. 

Thanks
Reply all
Reply to author
Forward
0 new messages