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

Get datetimepicker working correctly #225

Open
b-creative opened this issue Dec 18, 2023 · 0 comments
Open

Get datetimepicker working correctly #225

b-creative opened this issue Dec 18, 2023 · 0 comments
Labels

Comments

@b-creative
Copy link

b-creative commented Dec 18, 2023

In order to fully use the datatimepicker (that comes with the field 'date') and want to be able to choose also the time, you need to correct something in the file
/DesktopModules/OpenContent/lama/dist/js/chunk-vendors.js

You need to replace
format:"YYYY-MM-DDT00:00:00"
with
format:"YYYY-MM-DDTHH:mm"

You need to delete
"only-date":!0,

If you want to also see the chosen time as a field value, you need to replace something extra just underneath that list of attributes.
You need to replace
formatted: "ll",
with
formatted: "llll",

My list of attributes looks like this:
attrs: {
"no-header": !0,
"no-button-now": !0,
format: "YYYY-MM-DDTHH:mm",
locale: e.locale,
formatted: "llll",
label: e.options.placeholder
},

Ideal would be that one can pass some date/time variables in the field settings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants