Calendar Picker

Request for a new feature or component
Post Reply
drodriguez
Posts: 44
Joined: Wed Apr 11, 2018 7:32 pm
Status: Offline

Calendar Picker

Post by drodriguez » Wed Apr 11, 2018 9:14 pm

Consider the following features to calendar picker

Style:
* mini/compact Style (example: for mobile, or by media breakpoints) [show/hide header attribute / width, paddings, font size and line-height tiny]
* allow disable all days except specific(s) days (days array [2018/04/12, 2018/04/13, etc])
* allow set style to specific(s) day(s) (days array [2018/04/12, 2018/04/13, etc]) //different to data-preset

Events
* fire after change month (get new current month)
* fire after change year (get new current year)

Thanks

User avatar
olton
Site Admin
Posts: 114
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Thu Apr 12, 2018 8:37 pm

Implemented in 4.1.14

Code: Select all

+ [x] Calendar picker: add events `onMonthChange`, `onYearChange`
+ [x] Calendar: add `special days`
+ [x] Calendar: add attributes `data-show-header`, `data-show-footer`

drodriguez
Posts: 44
Joined: Wed Apr 11, 2018 7:32 pm
Status: Offline

Post by drodriguez » Sat Apr 14, 2018 3:17 pm

thanks a lot.
I tested events onMonthChange, onYearChange, the attributes show-header and show-footer and worked, great job

With special days it work first time :

example html = <input id="shuffle-filter-calendar" type="text" data-special="2018/04/02" ....
but, when onMonthChange or onYearChange fire i need draw new special days and not work, example:

$('#shuffle-filter-calendar').attr('data-special', '2018/05/08');
Metro.reinitPliginAll('#shuffle-filter-calendar');
(nothing happend... options.special keep original special attribute in _drawContent function)

what i did wrong?

P.D: additional, when reinitPligin or reinitPlignAll datepicker the button-group div duplicated (two button calendar and two button cross draw)

User avatar
olton
Site Admin
Posts: 114
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Sat Apr 14, 2018 3:38 pm

observation for attribute data-special will be added in 4.1.16

User avatar
olton
Site Admin
Posts: 114
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Tue Apr 17, 2018 9:36 am

### 4.1.16

Code: Select all

+ [x] Calendar: add observation for `data-special` attribute
+ [x] Calendar picker: add observation for `data-special` attribute
+ [x] Calendar picker: add observation for `data-exclude` attribute
You can change attributes in runtime to change calendar behavior.

Post Reply