jonleighton/date_input

Override excluded days

Opened this issue · 0 comments

Not really a bug, but I'm new to this repository thing and couldnt find how to share my update.
I have been developing an ecommerce site that you can choose your delivery date. Most of the year they don't do deliveries on a Sunday but on specific Sundays they do. So these are the mods I made (line numbers reffer to packed code):

line 52: insert non_selec_override: [],
line 73: add &&(this.indexFor(this.non_selec_override,this.dateToString(date))===false) to the end of the isHoliday function

Usage: non_selec_override: ["YYYY-mm-dd"] - just like the non_selectable array