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

Added support for field types 'date', 'datetime' & 'time' #499

Closed
wants to merge 2 commits into from

Conversation

mohamed-nazim
Copy link
Contributor

@mohamed-nazim mohamed-nazim commented Apr 12, 2022

Added input field of type 'date', 'datetime' & 'time' in form/search fields.

Q A
Is bugfix?
New feature? ✔️
Breaks BC?

Added input field of type 'date' and 'datetime' in form/search fields.
@WinterSilence
Copy link
Contributor

WinterSilence commented Apr 14, 2022

format of input(<input type="date/time/datetime-local" ...>) value not same to DB formats form date/time/datetime i.e. you need convert value before save

@mohamed-nazim
Copy link
Contributor Author

mohamed-nazim commented Apr 15, 2022

format of input(<input type="date/time/datetime-local" ...>) value not same to DB formats form date/time/datetime i.e. you need convert value before save

🤔 Imho, form renderers should not be responsible for db functions. That said, PR is based on current browser standards for date / date time input field. MDN definition for date says it uses YYYY-MM-DD standard and the definition for datetime-local uses YYYY-MM-DDT00:00 standard - which is what is sent over when the form is submitted (although what is rendered on the screen is based on local device settings/locale).

These formats conform to ISO-8601 date and time standards, which any receiving host in any language should (and does) decipher. DB operations are secondary but any modern db engine would resolve ISO-8601 formats without any hiccups.

Added input field of type 'time' in form/search fields.
@mohamed-nazim mohamed-nazim changed the title Added support for field types 'date' & 'datetime' Added support for field types 'date', 'datetime' & 'time' Apr 15, 2022
@mohamed-nazim mohamed-nazim deleted the patch-1 branch April 15, 2022 01:48
@mohamed-nazim mohamed-nazim restored the patch-1 branch April 15, 2022 01:56
@mohamed-nazim mohamed-nazim deleted the patch-1 branch April 15, 2022 01:59
@mohamed-nazim
Copy link
Contributor Author

Sorry... this got a bit messy trying to rename the branch 🙏

@WinterSilence
Copy link
Contributor

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

Successfully merging this pull request may close these issues.

2 participants