InputDatePicker Format

Posted by: rui.alves on 18 October 2022, 1:06 pm EST

  • Posted 18 October 2022, 1:06 pm EST

    Hello

    I wanted to format an InputDatePicker to not display the default date whenever it is not selected and pass a null value to the database.

    Something to replace in VB

    Datetimepicker1.Format = DateTimePickerFormat.Custom

    Datetimepicker1.CustomFormat = " "

    Thanks for the help :slight_smile:

  • Posted 19 October 2022, 3:15 am EST

    Hi,

    As we understand, you are using the InputDatePicker component in a C1InputPanel. We checked on our end and it does not display the default date in case the value is null. Could you please share a sample replicating the issue?

    If you are referring to the Value property that returns a default value when used in code, then you can use the ValuesIsNull property before checking the value. The ValueIsNull property indicated whether the selected date value is null.

    Regards

    Avnish

  • Posted 19 October 2022, 3:49 am EST - Updated 19 October 2022, 3:55 am EST

    Hello,

    Yes, I’m using inputDatePicker inside C1InputPanel. The form is linked to a table in a mysql database.

    What I wanted is the following: if the inputDatePicker still doesn’t have a value stored in the read register (if the date is null or does not exist), I would like it not to show the default date in the inputDatePicker, to be clean.

    Thanks

    Rui Alves

  • Posted 20 October 2022, 12:59 pm EST

    Hi,

    As we mentioned before, you can use the ValueIsNull property of the InputDatePicker. When you set the ValueIsNull to true, it will indicate that the component has a null value and it will show empty. Please refer to the sample attached.

    Regards.

    DatePicker_InitialValue.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels