Perspective date time input issue

Hi everybody, i am using IGNITION 8.0.12.
Having problem with datetime input.

  1. when i select date and click on button then we get value from the datetime input but when I clear datetime input text and click on submit button still i get current date from datetime input i was expecting blank or NON.

I have validation that datetime input has selected date or not but in this case if i have not selected any date still i am getting current i am not able to validate datetime Input.
please suggest me solution.
How do i check validation date input has text or its empty in script.

Which component are you using? I’m wondering if you’re grabbing the unlatched datetime value instead of the latched datetime from your description.

i am using DateTime Input component

Ok, I was able to recreate your issue. There doesn’t seem to be a native way (at least that I can tell) to clear out the datetime value from the component. I was able to make a quick and dirty workaround that just cleared the DateTime Input component’s value and formattedValues when I pressed a button.

datetimeInput = self.getSibling("DateTimeInput").props
datetimeInput.value = None
datetimeInput.formattedValues.datetime = None = None
datetimeInput.formattedValues.time = None

This way you can clear it out and know that your script will only grab valid datetimes or nulls

thanks for contributing.
but issue is when i select date and then clear using delete button on keyboard and I click on button then i am getting current date.
in this case I did not select any date because i have select date and then clear dTI input using delete button of keyboard.
i am looking for solution like if i select date and then clear that date using delete button of keyboard at that i want datetimeInput.value would be None.or you can suggest me any solution which property i need to set for this or any component event of DTI on that i can write code to archive this.