make default customOptions property in the Date/Time Component JSON + FormIoJS - javascript

I have installed the following module in Odoo Community 15.0 version.
https://apps.odoo.com/apps/modules/15.0/formio/
I am using a Date/Time Component on multiple forms.
I think the default behavior of Date/Time component UI is like below:
Default view on desktop like below screenshot.
But in Mobile (Mobile Web Brwoser) show the default Android date/time view.
To make it consistent I have used below options in the Component JSON
"customOptions": {
"disableMobile": true
}
Main Question: How can I add this customOptions to all Date/Time component by default?
currently, I need to add this option manually to all Date/Time Components (Already created and even newly created Date/Time component)

Related

Element-plus keep DatePicker component always open

I'm using element-plus library and I I'm struggling to achieve custom el-date-picker component behavior.
Is it possible to always keep date picker component open even after the values were selected from the calendar and applied to v-model? This is the component I'm working on: el-date-picker
I need to be able to select days from el-date-picker component and keep showing the calendar after the selected dates were submitted.

Material-UI pickers, partial date / multiple formats

I'm using the Material-UI-pickers library and have created a KeyboardDatePicker element that I would like to have a dynamic behaviour, allowing the user to enter partial dates by using the keyboard (while the behaviour of the picker popup should remain the same). I want 1998, 1998-04, 1998-04-12 to all be valid inputs.
I've been reading through the documentation but can't figure out a way to make this work. Any ideas?
https://material-ui-pickers.dev/api/KeyboardDatePicker
https://material-ui-pickers.dev/demo/datepicker

Make Fiori header fields invisible

I want to hide the Fiori app header field (which is used in several apps) in one of the apps, but SAP has not provided any extension to hide these type of fields.
How can I make Fiori header fields invisible?
Runtime Adoption (RTA) of UI5 could be used to remove/hide/rename/etc. UI elements. If you start the application with a user who is a key user (has SAP_UI_FLEX_KEY_USER) then you can switch to adoption mode via the 'Adapt UI' button & do the adjustments via hovering over individual UI elements. The result can be published and transported from dev landscape.
More at: https://help.sap.com/doc/saphelp_nw751abap/7.51.0/en-US/5c/424437bf794f809087fdce391149f2/content.htm?no_cache=true
You can do the following:
create a new library which contains a control which extends the PersinfoControl of library hcm.lib.common. In this extention overwrite the init function of this control, first call super, then replace the header with a custom fragment(copy of the original without the button).
Extend the Family Data app an replace the main View. Replace the reference to library hcm.lib.common with your newly created library.

Modifying Angular Material Datepicker popup

I would like to use the Angular Material Datepicker in my Angular application, but I a not quite satisfied with the default behavior The datepicker normally opens the calendar as a popup under the input. Instead I would like for the calendar to be permanently opened so that the user can continue to view the calendar as he selects different dates.
I understand that there is an opened property that reflects the status of the popup:
Angular Datepicker
Could I achieve the desired behavior by permanently setting the property to true to prevent the calendar from closing? I have never rally modified the default behavior of a library before...how would I go about this?
Perhaps a different approach would be separating the input from the calendar? I wonder what the best design approach would be?

How to open default date picker by javascript?

In normal html, I use below code to define an input date picker which allow user to select date in a popup calendar. It works fine.
<input type='date'></input>
but now, I want to show the date picker on a onClick function of a button. I know that there may be some other 3rd party date picker component available. But I don't want to bring new dependencies in my application. So i am looking for a default way to support this behavior.
BTW, my web app is built on react, redux framework. And it is running on android and iOS webview. If the default date picker doesn't support this requirement, any 3rd party component which is fit for mobile device and compatible with react is also welcome.
Give id to the input tag and then on click of a button use .focus() event
For eg: onclick="document.getElementsByTagName('input').focus()"

Categories