51
Views
9
Comments
Solved
When we try to show date picker input conditionally its not working
Question
Application Type
Reactive

Hello there,
My scenario is, I have a button show/hide.

When click on show only i need to show a date picker input. on click of hide it should be hidden

but it is not working for me instead I am getting this error.
Its not rendering the Datepicker input when we toggle this with condition.

2024-12-02 12-15-17
Aravind EONE
Solution

Hello All, 
thanks for your support.
I resolved it by adding this default class to the input field.

2023-01-26 16-03-24
Ana Agostinho

Hello Aravind, 
Are you using the widget IF to show/hide the date picker controlled by a boolean? 

Best regards, 

Ana

UserImage.jpg
Puja Rani

Hi Aravind,

By Datepicker input you mean input widget with date datatype , right? This seems to work. You can check this demo . Is this what you trying to achieve? If no, can you please elaborate what condition you are applying

UserImage.jpg
Puja Rani

Ok, it seems you have used DatePicker widget with input .  I can see in the error, I guess you have used DatePickerInitialized action and trying to set something using the widget id and that is throwing error because the datepicker is not yet loaded and before that you are trying to set some value. If you can re-check the logic, or attach OML so that we can check the logic .

2025-02-10 17-24-13
Arun Rajput

Hi Aravind,

Can you please share .oml file so we can understand how you are handling this.

Thanks

Arun

2024-12-02 12-15-17
Aravind EONE

Please find the OML,
Check test screen and click on manual entry button.

Passenger_CW.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP

we can't really do much with this oml, there's several missing dependencies.

Can you make a small demo oml without dependencies, reproducing the problem ?

UserImage.jpg
Puja Rani

Agreed with Dorine. Also as you mentioned you have show/hide button to display the date picker, I could not find that code anywhere too

2024-12-02 12-15-17
Aravind EONE
Solution

Hello All, 
thanks for your support.
I resolved it by adding this default class to the input field.

2024-12-02 12-15-17
Aravind EONE

Its really a disappointment that date picker and time picker is not working without this class.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.