amsul / pickadate.js

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.
http://amsul.ca/pickadate.js
MIT License
7.7k stars 1.02k forks source link

Date is not showing correctly #1206

Open sbabu955 opened 4 years ago

sbabu955 commented 4 years ago

If i am date as 03/03/2010, when I click on the calendar icon, it is showing as 03/12/2009. I am having lot of problems for this one image

DanielRuf commented 4 years ago

Hi @sbabu955,

please provide a working codepen so we can reproduce this.

sbabu955 commented 4 years ago

Hi @sbabu955,

please provide a working codepen so we can reproduce this.

Can you tell me what exactly we are expecting from my end. I am. Using the master branch code

sbabu955 commented 4 years ago

@DanielRuf I have updated the comment

DanielRuf commented 4 years ago

I am. Using the master branch code

You should use the latest release file (3.6.4) from npmjs, not a Git branch.

DanielRuf commented 4 years ago

Also we need the setup of your pickadate instance (config / options).

sbabu955 commented 4 years ago

@DanielRuf Can you tell me the package name please, npm install (package name). I am using git branch code.I am new to this one , please explain me clearly.

DanielRuf commented 4 years ago

It is pickadate, see https://www.npmjs.com/pickadate

sbabu955 commented 4 years ago

@DanielRuf If we refresh the page then date is coming correctly, after saving we are not refreshing the page, then it is taking last year and month as december

sbabu955 commented 4 years ago

@DanielRuf Can you please provide me two files ,picker.date.js & picker.js.

DanielRuf commented 4 years ago

You can use https://unpkg.com/pickadate@3.6.4/lib/picker.js and https://unpkg.com/pickadate@3.6.4/lib/picker.date.js

sbabu955 commented 4 years ago

@DanielRuf Have you checked my last comment?

DanielRuf commented 4 years ago

I provided you the links to the files.

Without a pure codepen without any other code than what is needed to demonstrate this I can not test it.

sbabu955 commented 4 years ago

@DanielRuf I am date picker in the form.Inside the form we are having start date and end date.After all the mandatory things added then if I save the form , then the correct date is passing .But once after saving the form without reloading the full page, then if we click on the calendar it is showing the last year and december month as default

DanielRuf commented 4 years ago

Please provide a codepen which shows this. So far I assume that it is a bug in your code which initializes and sets the wrong date (see the pickadate API).