eureka2 / ab-datepicker

An accessible and bootstrap compatible datepicker
MIT License
63 stars 55 forks source link

Reinitialize datepicker() without reloading the page #49

Closed getsetgopi closed 5 years ago

getsetgopi commented 5 years ago

Is there a way to reinitialize the datepicker() without reloading the page? I want to reinitialize on click of a button.

eureka2 commented 5 years ago

just empty the contents of the target input. For example, if the ID of the target input is 'date', do : $('#date').val(''); when the user clicks on your button.

getsetgopi commented 5 years ago

I have modified the code to include French verbiage. When the html lang changes to Fr on page load, the month and days in the calendar change to French. But there are cases where language switch happens without page reload. I need to find a way to destroy and re-initialize the datepicker()

shoaib-iqbal commented 3 years ago

I want to re-initialize date picker on response of ajax as I am giving dynamic available dates. Is there a way I can re-initialize datepicker ?