Skip to content

Request to add sugar to check if a date is disabled #479

@NateWr

Description

@NateWr

I'm currently using the .set() API method to set the datepicker to today's date when the form is loaded:

datepicker.set( 'select', new Date() );

If today's date is invalid, the datepicker will automatically select the soonest valid date. That's really nice, I like that. But is there any way to check if a date is valid before setting it

In some instances, I might want to set nothing if today's date is invalid. But I haven't been able to discern a way to accomplish this with the API, short of pulling the disabled dates and writing a lot of JS to check myself (I am dealing with quite complex disabled date rules).

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions