Page MenuHomePhabricator

input type=date and input type=datepicker store different format
Closed, ResolvedPublic

Description

When using input type=date the date is stored like 2021/02/04

and when using input type=datepicker it is stored like 2021-02-04.

Because of this MW registers a page edit even when the user did not make changes to the page by form (nulledit) and the form makes changes to the existing data with no need when the input type is changed from one to the other.

I think it is the same with datetime and datetimepicker.

Both input types should store data the same way. Forms should never change existing data in any way if there is no user action to the field.

Event Timeline

Change 981434 had a related patch set uploaded (by GladwinJ; author: GladwinJ):

[mediawiki/extensions/PageForms@master] Replace / with - in dateinput and datetimeinput

https://gerrit.wikimedia.org/r/981434

Change 981434 merged by jenkins-bot:

[mediawiki/extensions/PageForms@master] Replace / with - in dateinput and datetimeinput

https://gerrit.wikimedia.org/r/981434

Yaron_Koren claimed this task.