Hello, i have a page that displays a date of birth from a record.
The issue that i have is that while it shows fine for me (Windows / Google Chrome), i have a client that is working on a mac with safari and it doesn't display the default date.
Here is what it should look like
But on the mac, its a blank text field
here is the code i use for the input value <input id="dob" name="dob" type="text" class="form-control" is="dmx-date-picker" showdropdowns="true" minyear="1920" required="" dmx-on:changed="var_age.setValue(value.yearsUntil(var1.datetime))" format="MM/DD/YYYY" dmx-bind:value="sc_patient_info.data.query[0].dob.formatDate('MM/dd/yyyy')">
can you see any reason why it wouldn't show for them?
If you open your browser console, you will see this message:
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to Moment.js | Guides for more info.
Not sure if that's the cause of the problem on Safari, but regardless it's something you must also fix. I'm not familiar with the problem or the date form field web component so I can't provide further advice. Check if you're doing things the right way (according to the documentation), and if yes, consider opening a bug report.
I am also getting the same message as Apple has posted.
I can also see a hidden input as Brad has posted, which is showing the DOB correctly, but the returned date value is in different format to the visible input field.
You can try changing the formatting to Localised L instead of MM/DD/YYYY to see if it resolves the issue.
I will suggest adding 2 or 3 input fields on the test page with localised formatters and corresponding formatters of the dynamic value to check the most appropriate format for your app. We can test these and let you know if there are any errors.
are you only seeing that hidden field on the safari browser? Because i have checked the code and i do not see where you are seeing a hidden field for the DOB in the page.
Never noticed this before. I checked the dmx-date-picker input field in another project and I can see that a hidden input field has been automatically created with name and value, if available.
i also created a 2nd input value for the DOB and removed the dmx-date-picker from the formatting and it shows the DOB date fine on safari - take a look https://atgenius.com/test.asp
i did test the format and it didn't change the outcome.
Unfortunately i can't open a console as i am working soley on an Ipad to test the page. I am not a Mac user, so i only have limited equipment.