State Persistence

18 Apr 20171 minute to read

You can sustain the entire widget model of DatePicker even after form post or browser refresh by using enablePersistence property. So the entire model values such as

  • Selected date
  • Highlighted date
  • Start and depth level

are stored in local storage / cookies of browser before page refreshes and reinitialized with the restored model after refresh.

  • $(function () {
                // creates DatePicker from input
                    enablePersistence: true // persists the DatePicker model