Flutter set date of InputDatePickerFormField programmatically - flutter

The InputDatePickerFormField is a widget that presents a TextFormField and allows the user to enter a date manually as a string. This is fine and works great on its own (although I can't find a way to set its date format to dd/mm/yyyy instead of the default mm/dd/yyyy).
I want to also give the user the option to choose a date from the datePicker UI, but that means capturing the selected date from the picker and then programmatically setting this date to the form field. The InputDatePickerFormField class does not expose its controller for setting the string on the field, and there are no public methods for doing so.
Does anyone know of a way to do this?

In the Flutter documentation is written
When the field is saved or submitted, the text will be parsed into a DateTime according to the ambient locale's compact date format.
It means it is formatted automatically after the date change. The "the ambient locale's compact date format" is automatically determined from user device settings. You can set supported localization at the app level as described here. You can play with user device localization in Chrome to verify it is working properly (the first language is used for app localization). .

Related

Localisation for the Netlify CMS UI Date Picker widget?

Is there any way to change to localisation of the Netlify CMS UI so the Date Picker widget is displayed in Monday-Sunday weeks and 24 hour times? I set the locale to ‘en-GB’ on the off-chance that would do it, but no luck.
I'm not looking to change the format of the output, but looking for the UI element to be formatted correctly for my locale. There is a hint to this being possible on the GitHub page, but I can't find how to set the config appropriately.
The sourcecode for the netlify datetime widget shows it uses react-datetime under the hood.
According to those docs, you can pass in a locale there, which is how you'd make monday the day of the week. I would suggest copying the netlify datetime widget (sourcecode here) modifying it to pull in the requirementrs correctly, and then passing in a locale as a prop to the DateTime widget within that.
(Previous answer was incorrect - I thought locales was the solution to this (it normally is with react-datetime), but the netlify locales are only for providing language translations, my bad.)

Orbeon Forms - Date Picker Changes to Wrong Date

When a user enters an invalid date into the date picker field for example, 99/99/99999 and the user clicks away causing the input to loose focus the date changes to 7/6/99999 which is undesirable as this will pass date validation and not strong smart entry support.
I understand this is caused by forceParse a feature of the underlying Bootstrap date picker.
I also see this is set to true in the Scala class implementing the date picker.
Is there anyway to stop this behavior or set forceParse to false in the xbl component when configuring the form?
This issue with inconsistent parsing of years above 10,000 is fixed in Orbeon Forms 2020.1 (which isn't yet released at the time of this writing). For more on this, see #4637.

sap.m.PlanningCalendar - How to display hour in 24-hour format?

I am using a planning calendar where I am displaying the appointments. I am showing the calendar from 7AM to 5PM. But I want the Hour format to be in 24-hour format, like after 12PM it should be 13, 14, 15.. likewise.
It seems like hour format for planning calendar depends on browser locale. For example for me (Europe, Poland) hours are in 24hours format.
It is related to Launchpad settings:
You can set it default in transaction SU01 tab defaults for selected user or You could do massive change in SU10. If You need more information You could find it in 2404186 SAP Note launchpad.support.sap.com/#/notes/0002504186
It's not the most ideal answer, but the 12/24 can be influenced by the locale. For example, adding the URL parameter sap-locale=ES (or sap-language) would use the 24 hour setting because that's how the locale is defined. You could also do it by calling:
sap.ui.getCore().getConfiguration().setFormatLocale()
before rendering with a locale (as string) which uses 24hr.
It may be possible to extend locales to have a special one that has a 24hr format, but the rest of the settings being the same, but I couldn't find any examples of how to do this, and it's not immediately apparent to me.
edit: if English is necessary, locales such as "en_GB", "en_IE" or "en_ZA" may be used.
That doesn't work for us, my Fiori launchpad is set to 24hr as well as in SU01 backend system, but the Planning Calendar still shows 12PM.
Any other suggestions?

How I can customize a datepicker in Sulu?

Are there any methods to customize datepicker in Sulu via XML page config (e.g. I need to change date format)?
Sounds trivial, but http://docs.sulu.io/en/latest/reference/content-types/date.html says "No parameters available."
I am afraid to tell you that this is currently not possible... It would be nice if you create an issue on github also explaining the parameters you'd like to have.
And apart from that, the date format is based on the user language, so if the user has english as UI language he also gets the english formatted date. On the website you can use e.g. the date twig filter to format the date however you like.

Plone 4.2: DatePicker Widget with YY/MM/DD instead of DD/MM/YY

In my Plone 4.2 site the DatePicker (e.g. when adding a new "event") displays as YEAR MONTH DAY
However, I do have a German Website, where it should be the other way around. That is:
DAY MONTH YEAR. How can I change this?
PS German is already selected as default language from Plone's language control panel.
PPS I don't know if this is related in any way, but since this might be a localisation issue, I'd rather tell: I use raptus.multilanguageplone
edit: added correct image link | say, that this happens when adding/editing a new event
I can't see the image you added because the URL is expired. so I'm going to assume you mean for the add/edit form of an Archetype (In Plone 4.2 the default types are all Archetypes).
There seems to be no easy fix such as a site-wide setting in the control panel, but you can change the ordering in the calendar_macros.pt template. This however means you'll have to change the raw HTML.
To do this, you'll have to go to the Zope Management Interface (reached via the Site Setup page "Plone/##overview-controlpanel").
Then click on the "portal_skins tool" and then "plone_templates". Then click on "calendar_macros" and then click the "Customize" button.
Now you can change the ordering in the raw HTML/TAL.