Using Date Picker UI pattern doesn't give the desired result
Question
Application Type
Reactive

See screenshot with 2 options for choosing and showing a date. 


Option 1 is inputfield of type Date. It is easy to change the dateformat and to pick the value of the chosen date in a local variable.

In option 2 I'm using the Date Picker UI Pattern, and I've tried to reach the exact same result as in option 1. But I didn't manage. Is this possible, and how then?

I've enclosed the oml.

Datetest.oml

Solution

Hello @Jay Vanderven 

I have fixed a couple of things in the oml for the 'Start Date'. Please review. It works now as shown below:

Changes:

1. Set the 'StartDate' property to the Event's Start Date (same for EndDate of course)


2. I changed the Expression shown below to use the PickerDate2 (and not the InputText2)

Regards,

AJ

Datetestv2.oml

Hi,

I've solved this myself by adding an extra assign in DatePickerOnSelect action:

InputText2 = FormatDateTime(#2021-09-15#,"DD-MM-YYYY")

Great! If you prefer, another option can be:

1. Set the Data Type for InputText2 as a Text.
2. Set Input Type for Input_TextVar2 as Text and Prompt to "DD-MM-YYYY"

3. Set DateFormat property of Date Picker as shown below

Output:

Hope this helps

Regards,

AJ

Solution

Hello @Jay Vanderven 

I have fixed a couple of things in the oml for the 'Start Date'. Please review. It works now as shown below:

Changes:

1. Set the 'StartDate' property to the Event's Start Date (same for EndDate of course)


2. I changed the Expression shown below to use the PickerDate2 (and not the InputText2)

Regards,

AJ

Datetestv2.oml

Hi AJ,

Thx. The output of Picked date 2 is now the same as in Picked date 1. 

Is it also possible to show the input of the 'Choose date' in Option 2 in the format DD-MM-YYYY (instead in the format YYYY-MM-DD)?


Hi,

I've solved this myself by adding an extra assign in DatePickerOnSelect action:

InputText2 = FormatDateTime(#2021-09-15#,"DD-MM-YYYY")

Great! If you prefer, another option can be:

1. Set the Data Type for InputText2 as a Text.
2. Set Input Type for Input_TextVar2 as Text and Prompt to "DD-MM-YYYY"

3. Set DateFormat property of Date Picker as shown below

Output:

Hope this helps

Regards,

AJ

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