tamble / jquery-ui-daterangepicker

A JQuery UI based date range picker.
MIT License
184 stars 110 forks source link

hide preset panel #63

Open playerzero opened 7 years ago

playerzero commented 7 years ago

I would like to implement this without the preset panel, but i'm not seeing an obvious way to do this... Is it possible (aside from hiding via CSS)? Thanks.

op16 commented 7 years ago

No, it's not possible. We consider the presets panel as one essential feature of our widget, so it's not likely to become optional in the near future. Maybe only after a complete rewrite (which would come by v1.0)

saurabhdeep commented 7 years ago

I did it by setting presetRanges to an empty array and then overridden some css classes to remove unnecessary borders and padding. Looks just like the original jquery ui datepicker after doing this much.

playerzero commented 7 years ago

Thanks for the info. The requirement i was trying to fulfill was to have a single datepicker showing 2 months, with the ability to select start and end dates. The preset panel is extraneous to this particular requirement. Just FYI, in case you do want to consider this for a future release. Feel free to close this, i'll leave that to you.

marccompte commented 7 years ago

Would be useful at least to be able to give a custom class name to the div.comiseo-daterangepicker-main. This way one would be able to remove the presets manually with CSS on a particular instance. In my case we use it in two places, one of which requires not to have any preset range while the other one requires to have them. With a custom class on one of them we could do it easily.