nazar-pc / PickMeUp

Really simple, powerful, customizable and lightweight standalone datepicker
BSD Zero Clause License
615 stars 191 forks source link

Add classes to end and start date in range mode #170

Closed ceephax closed 7 years ago

ceephax commented 7 years ago

This would be handy so that I can style the start and end dates differently from the rest of the range.

nazar-pc commented 7 years ago

Start end end of what?

ceephax commented 7 years ago

Like this: pmu

Although if the range crossed multiple calendars/months the last class should be on the very last instance of the range.

nazar-pc commented 7 years ago

It is already possible with current set of events and callbacks PickMeUp provides to the developer: https://jsfiddle.net/mm4juee4/ Yes, it is a bit of code, but there are more use cases and I'd like to enable people to achieve them without editing PickMeUp's source code rather than implementing everything in the core.

niteshkumar-singh commented 5 years ago

After doing this if pickmeup('.date').clear(); use to clear then its show this error:

index.html:50 Uncaught TypeError: Cannot read property 'valueOf' of undefined at Object.render (index.html:50) at pickmeup.min.js:489 at HTMLInputElement.fill (pickmeup.min.js:524) at HTMLInputElement.clear (pickmeup.min.js:1027) at :1:20

nazar-pc commented 5 years ago

I have no idea why it happens without any demo