stefangabos / Zebra_Datepicker

A super-lightweight, highly configurable, cross-browser date time picker jQuery plugin
https://stefangabos.github.io/Zebra_Datepicker/
Other
399 stars 183 forks source link

Add support for adding classes to Zebra_datepicker instance #165

Closed betheymc closed 4 years ago

betheymc commented 4 years ago

The custom_classes option seems to only apply to certain dates within the Zebra_datepicker.

If there could be a way to add a class to the Zebra_datepicker instance, that would be awesome. I need to be able to set the datepicker's z-index so that it will show over everything else no matter what.

stefangabos commented 4 years ago
.Zebra_DatePicker { z-index: 9999 }

?

betheymc commented 4 years ago

@stefangabos You're right, I could set it in CSS, but the code base I'm working on is fairly large, and setting all the datepickers with CSS may interfere with other elements with z-index properties. I only needed to set it on specific instances (not all) of Zebra_datepicker.

I should have specified that I needed to change the z-index via JavaScript. As it turns out however, I no longer need to do this, since I think the datepicker will show up correctly anyway, and setting the z-index didn't make a difference with our previous datepicker (jQueryUI).

It may be helpful for other users to have the ability to add a class to the Zebra_datepicker instance, but I no longer need that right now.

Thank you for all your work on this plugin, it is very useful!