DatePicker & TimeInput expose incorrect FormData.
See original GitHub issueWhat package has an issue
Describe the bug
When trying to use Mantine Date inputs with a framework like Remix which favours sending the pure HTML Form Data to the server to be processed, DatePicker and TimeInput do not expose the correct values.
DatePicker sends the formatted Date which is seen in the input field ont he presentation side, and TimeInput only sends the hours.
Ideally the .toDateString()
, .toTimeString()
or even .toISOString
should be returned.
What version of @mantine/hooks page do you have in package.json?
5.5.2
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/mantine-date-form-values-lpl7lw
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
Yes
Possible fix
The input field should not have it’s value set to the formatted date/time, instead there should be a shadow input field showing the presentation data.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Date Picker it putting the wrong date into form data - Jotform
I have a form that I am using the date picker field to have people provide their date of birth. When they put...
Read more >JQuery datepicker pre-populated in wrong format
When the page loads the startDate and endDate text boxes: "Fri Mar 14 13:54:08 WST 2014" but should be in "dd/mm/yy" format. On...
Read more >jQuery datepicker adds wrong dateformat ('jj') [#2856256]
Problem /Motivation When using better exposed filters on a Date field on D8 (in this case Drupal core 8.2.6 ) and using the...
Read more >DatePicker - Mantine
dateParser function should always return Date object. If parsed date is invalid when input is blurred value will be restored to last valid...
Read more >What is wrong with my JQuery UI datepicker option code?
I have an AJAX view using Views 3 and Better Exposed Filters (and therefore jQuery UI datepicker). One of the exposed filters is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue is fixed, it will be available with 6.0 release with dates package revamp
Awesome. Thanks!