amsul / pickadate.js

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.
http://amsul.ca/pickadate.js
MIT License
7.7k stars 1.02k forks source link

[Question] Allowing multi enabled range, with some overlapping disabled ranges/values #1184

Open Ardenine opened 4 years ago

Ardenine commented 4 years ago

Hello everybody, thanks to amsul and all contributors for this nice picker.

I've a doubt related to the enabling/disabling processes. I really don't get the point with this part of the documentation: https://amsul.ca/pickadate.js/api/#method-set-disable-enable-dates

I want to enable one or more time-ranges and disable one or more ranges or even some specific times.

Why something like this properly works some_obj.pickatime('picker').set({enable:[{from:[7,0],to:[20,0]}], disable:[true, [10,0], {from:[15,0], to:[16,0]}]});

and something like this, does not (?) some_obj.pickatime('picker').set({enable:[{from:[7,0],to:[10,0]},{from:[13,0],to:[20,0]}], disable:[[15,0]]});

Is there a way to make it working, specifically changing the logic of the enable/disable properties? Thank you!