I have a date picker in a table with some logic to be enabled/disabled depending on some conditions.
The problem is that he is always disabled because of some CSS that I found in the custom theme that I can't change.
I attached the OML with my example with the code, the goal is to not be able to edit the hiring date if is in the past and with Complete status. Currently I'm not even able to edit the others.
If that code was removed it would work properly. How can I change in my theme so that the date picker will be able to have the enable disable function again?
Thanks
Hi Gonçalo ,
Sorry, I missed the !important property value defined in the custom base theme style definition.
To make it work, you will need to add the !important property value to all the overridden style rules in the Screen stylesheet section, as shown below.
CSS Snippet:
.is-editable__datepicker[readonly="readonly"] { pointer-events: all !important; background-color: var(--color-neutral-0) !important; }
I hope this helps you!
Kind regards,
Benjith Sam
Hi,
I have done some changes in CSS. Attaching the OML for reference. Hope this helps!.
@Puja Rani thanks for the response, indeed if we comment the my previous css it will work, but if we don't put any css it would also work. The problem is I want this to work with that specific code.
That code is in another theme that I'm not allowed to edit so I need to override it with my code.
Hi Gonçalo,
I have made a few code changes in the attached OML file, as mentioned below:
.is-editable__datepicker[readonly="readonly"] { pointer-events: all; background-color: var(--color-neutral-0); }
Please refer to the attached OML file with the implemented code changes.
Hi Benjith, that looked good, learned a few things, but unfortunately I tested your OML and the date pickers are still all disabled regardless of the Status.
The base theme is still overriding the class you created.
Regards,
Gonçalo
Thanks it worked perfectly.
Best regards,
You're welcome, Gonçalo. I'm glad to hear that it worked perfectly for you :)