bevacqua / rome

:calendar: Customizable date (and time) picker. Opt-in UI, no jQuery!
https://bevacqua.github.io/rome
MIT License
2.91k stars 223 forks source link

Disable all the past or future dates #148

Closed 3ilguun closed 8 years ago

3ilguun commented 8 years ago

I'm having trouble with disabling all the past or future dates. Please give me an example.

Thanks.

3ilguun commented 8 years ago

Not sure this is good way or not. I've get the current date using jQuery and used the beforeEq, afterEq. Like this:

Disabling past dates:

dateValidator: rome.val.afterEq(today)

Disabling future dates:

dateValidator: rome.val.beforeEq(today)