Home > Web Front-end > HTML Tutorial > Chrome DatePicker problem, it bothered me all afternoon_html/css_WEB-ITnose

Chrome DatePicker problem, it bothered me all afternoon_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:20:23
Original
1048 people have browsed it

There is a date input box in the page form. The date format is dd/MM/YYYY. I use JQuery UI DatePicker. Then I found a very strange phenomenon. Chorme will verify it for me according to MM/dd/YYYY. Verify If the date is wrong, it will not be submitted. Then focus on the date input box, and the calendar plug-in will pop up and let me select the date again. There is no problem with IE and FF. The new version of chrome has a native datepicker function. Is it because of it?
I beg for a solution.


Reply to discussion (solution)

It should not be affected by native datepicker.
DatePicker has
"option", "dateFormat" to set the format. You set it ?

In addition, the general format Y is lowercase, you can try changing it to yyyy

It should not be affected by the native datepicker.
DatePicker has
"option", "dateFormat" Set the format, have you set it?

In addition, the general format Y is lowercase, you can try changing it to yyyy
I wrote it wrong. I have set dateFormat: 'dd/mm/yy', and the selected date will also follow this format. For example, today: 18/04/2013
In this way, the submission will focus on the date input box. If you enter 12/04/2013, it will be submitted. I guess chrome regards the first one as the month, and 18 does not exist. So I was asked to re-enter the date and did nothing else, not sure how to debug this issue. All other browsers are fine, but something is wrong with Chrome, so frustrating!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template