nazar-pc / PickMeUp

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

calendar flat mode-Display only mode #179

Closed bandish2189 closed 6 years ago

bandish2189 commented 7 years ago

Hello,

I am using PMU calendar for web portal.

there are 2 functionality where i am using PMU.

  1. select dates when employee will be on leave.
  2. Get dates from Employee'd leave table. and display on PMU calender.

ISSUES :

  1. In this 2nd option i am trying to disable any event bound to calneder date,month,year selection. Because here there is only display functionality on this page. dosent need to select dates from calender. this is only view mode. Note. i need only highlite provided dates on calender. and disable select or change any event on this calender. How can i achieve this?
nazar-pc commented 7 years ago

The first thing that comes to my mind is to attach event listener to relevant elements and just call e.stopPropagation() in event handler, so that clicks wouldn't work. You can also add overlay element with opacity: 0 that should prevent any clicks on element.

bandish2189 commented 7 years ago

Thank you for your quick response.

bandish2189 commented 7 years ago

Hoe can i disable selection to today and previous dates in calendar?

nazar-pc commented 7 years ago

https://github.com/nazar-pc/PickMeUp#selectingdisabling-dates-with-custom-logic

bandish2189 commented 7 years ago

Thank you for your quick assistance.

bandish2189 commented 7 years ago

I've recently modified main library file. and added function nameed: dates_in_future() to get selected dates from calender. is there any default method to get such thing?

nazar-pc commented 7 years ago

If you need to get dates, https://github.com/nazar-pc/PickMeUp#get-date should be fine, it will return an array if you have multiple dates selected.