Skip to main content
14-Alexandrite
July 13, 2020
Solved

How i show date picker if i am clicking on radio button?

  • July 13, 2020
  • 2 replies
  • 1675 views

want to change the field according to radio button , 1)If unlimited is checked then membership length field is hide and 2)if specific length is checked then membership length field show two field one for insert number and second for dropdown of day,week,monthand year and 3) If fixed date is checked then membership length field show date picker for start date and end date. please refer below attachment 

Best answer by cmorfin

@Ru_01 

 

To show/hide the date picker based on the selection of a radio button you can bind the state property of the radio button to the visible property of datetime picker

 

cmorfin_0-1594632464279.png

Hope this helps

Regards

Christophe

 

2 replies

cmorfin19-TanzaniteAnswer
19-Tanzanite
July 13, 2020

@Ru_01 

 

To show/hide the date picker based on the selection of a radio button you can bind the state property of the radio button to the visible property of datetime picker

 

cmorfin_0-1594632464279.png

Hope this helps

Regards

Christophe

 

16-Pearl
July 13, 2020

You could do this by binding the State property of radio buttons to the Visible property of Date Time Picker & Numeric Entry widgets. In your case, use 3 Date Time Picker & 1 Numeric Entry widgets.

 

  1. Uncheck all 4 widget's Visible property so that when Unlimited is chosen none of them is visible
  2. Bind Specific Length radio button's State to the 1st Date Time Picker & Numeric Entry widgets' Visible property so that only 1 DateTimePicker & the Numeric Entry widget is visible 
  3. Bind Fixed Date radio button's State property to the visible property of the remaining 2 date time pickers, so that only they are visible when this option is selected

You could use an expression function if you prefer to achieve this using 2 Date Time Pickers.