jtsage / jtsage-datebox

A multi-mode date and time picker for Bootstrap (3&4), jQueryMobile, Foundation, Bulma, FomanticUI, and UIKit (or others)
http://datebox.jtsage.dev/
Other
474 stars 166 forks source link

set Calendar default day to tomorrow #476

Closed ttresslar closed 5 years ago

ttresslar commented 5 years ago

I am trying to set the default start date to be tomorrow instead of today. We are selling tickets, but the customer cannot buy tickets for today since the shuttles have already departed. I was able to black out today by setting notToday = true, but the default value is still today. There is no really easy way to do this with js, so it would be great to have this as a feature within datebox.

jtsage commented 5 years ago

Hmm. As it happens, the defaultValue option is broken in the current build. If it were not, you could actually do this via:

defaultDate: new Date.adj(2,1)

but, not inline in the HTML. have to do it using prototype options.

That said, I’m going to add:

defaultDate: “+/-### of seconds”

This second one will work inline. Gimme a couple hours to finish docs and push it live.

jtsage commented 5 years ago

SHA: 6e6700c5ca23f61a82b0c4807922f5def9d1e8aa

jtsage commented 5 years ago

Pushed in version 5.1.5

https://datebox.jtsage.dev/defaults/

ttresslar commented 5 years ago

Wow. Thanks for the quick reply! Looking forward to trying it out