Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

選擇10月之後的日期都會出現NaN-NaN-NaN #4

Open
sym363 opened this issue Aug 4, 2017 · 2 comments
Open

選擇10月之後的日期都會出現NaN-NaN-NaN #4

sym363 opened this issue Aug 4, 2017 · 2 comments

Comments

@sym363
Copy link

sym363 commented Aug 4, 2017

如題,不知道為何10月之後的都會有問題,之前的都正常

@slouchy
Copy link

slouchy commented Aug 17, 2017

https://github.com/slouchy/JQueryDatePickerTW/releases

可以參考修改後的版本

@amichael615
Copy link

我也有遇到同樣的問題,因為補零機制異常,大於10的月份(10、11、12)會被補成"010、011、012",故我使用另外一種補零方法,就可以使用了,可以參考看看。

// 年分小於100會被補成19**, 要做例外處理
 var yearTW = (inst.selectedYear > 1911 ? '0': '')+ (inst.selectedYear-1911) ;
 var monthTW = (inst.selectedMonth + 1 < 10 ? '0' : '') + (inst.selectedMonth +1);
var dayTW = (inst.selectedDay < 10 ? '0' : '') + inst.selectedDay;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants