What is the Date Picker Control Default Value?

How Can We Help?

What is the Date Picker Control Default Value?

< Back

Answer

Date Picker control is initialized with a value of 1/1/0001 12:00:00 AM, therefore, IsNullOrEmpty(DatePicker) does not work to check whether a user entered the value in the Date Picker control or left it empty.

Use the following code in the expression editor to check if Date Picker control has value:

Iif(GetYear([DatePicker]) == '1', true , false)

When faced with a null or empty situation that’s not working the following can assist:

  1. Create a reference label to use as a test
  2. For the Value Expression use:
    Iif(IsNullOrEmpty(ToStr([TR1070Object])), '' , ToStr([TR1070Object]))
  3. Which will return the current value of said control to the screen for you to view what it contains.
Comments are closed.

This is the legacy version of the XMPro Documentation site. For the latest XMPro documentation, please visit documentation.xmpro.com

X