nazar-pc / PickMeUp

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

Problem with rendering the good date while published // Edit: Resolved #168

Closed Buzzak closed 7 years ago

Buzzak commented 7 years ago

I tried with different version of windows server 2016/2012 and different IIS

Calendar initialization :

    var elements = document.querySelectorAll('.birthdate');
    for (var i=0; i < elements.length; ++i) {
      pickmeup(elements[i],  {
        first_day: 0,
        default_date: false,
        hide_on_select: true,
        view: 'years',
        mode: 'single',
        min: new Date(1920,1,1),
        max: new Date(2020,1,1),
        date: new Date(1975,1,1),
        format: 'Y-m-d'
      });
    }

First time i try to pick a date the calendar is in the good year gooddate

If i try to change the date this is what i get wrongdate


With the 2e initialization:

    var elements = document.querySelectorAll('.datepicker');
    for (var i = 0; i < elements.length; ++i) {
      pickmeup(elements[i], {
        first_day: 0,
        default_date: false,
        hide_on_select: true,
        view: 'days',
        mode: 'single',
        format: 'Y-m-d'
      });
    }

First time it's correct

2egood

and when i try to change the date,...

2ewrong

I know on my local machine it work perfectly... I can't debug while it published cause the js is minimized. Plz help ! And thank you

EDIT:

I found the problem, cause i use MVC Bundling minimize for script. The problem is when it minify the pickmeup.js...

I just removed the line in my bundle and added the script in the header like the demo.

Now it work!

nazar-pc commented 7 years ago

Glad to know it works for you. If you have any other questions, always create new issue, please.