how to disable the dates in datepicker

  • 1
  • Question
  • Updated 3 years ago
  • Answered
  • (Edited)
how to disable the past dates in datepicker
Photo of chandu

chandu

  • 190 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
The Datepicker is straight up JQueryUI.  So head over to the API Docs to see how it can be customized.  Looks to me like beforeShowDay option is what you need. 

To implement that customization on the Skuid date picker - take a look at this forum post where Zach describes overriding the standard Datepicker. 
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
I used Zach's post in the link above with JQuery's minDate function to not allow dates before another date from a field on my model. This allows for a simple, user friendly way to prevent users from selecting an end date before the start date.