While using the app, how do you clear the date value? For example, the visit date was correctly entered as 8/1/2016, and the end user wants to clear that date because no one was visited yet. (I can't seem to select the date to delete it, and there is no 'x' at the right of the field.)
Thank you,
Audrie
Solved! Go to Solution.
To allow users to clear the date (empty the DatePicker)
Select datepicker control and sets its IsEditable property to true
Now the user can delete the value using the keypad.
To reset the datePicker to the default value (set via Date.DefaultDate)
1. Add a button control.
2. Select the datepicker control
3. Set its Reset property to Button1.Pressed
Known issue: if default value is null, reset is not working properly, fix coming soon.
Please let meknow if options above works for the scenario below, happy to further help.
Thank you,
Laura
To allow users to clear the date (empty the DatePicker)
Select datepicker control and sets its IsEditable property to true
Now the user can delete the value using the keypad.
To reset the datePicker to the default value (set via Date.DefaultDate)
1. Add a button control.
2. Select the datepicker control
3. Set its Reset property to Button1.Pressed
Known issue: if default value is null, reset is not working properly, fix coming soon.
Please let meknow if options above works for the scenario below, happy to further help.
Thank you,
Laura
Hi I observed that if user enters a date and saved it. LAter on decided to remove the date and save it the old date still remains.
This proposed solution doesn't work. The reset = true doesn't clear the date field in the selected record.
So far the only solution that I've found to work (unfortunately) is patching a new record with all exact same fields than the original one but the date I want to clear and then removing the original record.
hope it helps!
For people in search for the functionality that variables (dates) should be emptied / nullified without the help of a button I created the following workaround.
I needed to empty the default value of a date picker but also have that date picker populated with a date based on other information.
Scenario: when someone opens the date picker of a pregnancy estimated due date --> I want the date picker to show the month of 40 weeks from now (just because I don't want pregnant women to have to click too much).
If(IsBlank(DateEstimated.SelectedDate),ClearCollect(CollectionDateEstimated,{CollectedDateEstimated: DateAdd(Now(),280,Days)}))
Last(CollectionDateEstimated).CollectedDateEstimatedSo when someone opens the date picker - the month of 40 weeks from now is opened
This way --> whenever the date picker needs to be emptied this can be achieved by having an (onChange or onSelect event) clearing the collection with the formula =
Clear(CollectionDateEstimated)
For people in search for the functionality that variables (dates) should be emptied / nullified without the help of a button I created the following workaround.
I needed to empty the default value of a date picker but also have that date picker populated with a date based on other information. Scenario: when someone opens the date picker of a pregnancy estimated due date --> I want the date picker to show the month of 40 weeks from now (just because I don't want pregnant women to have to click too much).
If(IsBlank(DateEstimated.SelectedDate),ClearCollect(CollectionDateEstimated,{CollectedDateEstimated: DateAdd(Now(),280,Days)}))
Last(CollectionDateEstimated).CollectedDateEstimated
This way --> whenever the date picker needs to be emptied this can be achieved by having an (onChange or onSelect event) clearing the collection with the formula =
Clear(CollectionDateEstimated)
@LauraOnu is there any update on this issue?
When reset function will be fixed or there is any other method to clear the date value ?
Use the Reset() function on a button.
Reset(<DateInputField>);
This is how I used it on a back/cancel button, and should use it on the submit button after it submits to clear the form for next time.
Set(_showInstallPopup, false); Set(_resetInstallPopupInput, true); Reset(InstallPopupInputEPC_DS); Back()
The reset Property via a variable is broken for the DateInputField
User | Count |
---|---|
141 | |
137 | |
78 | |
77 | |
72 |
User | Count |
---|---|
228 | |
178 | |
68 | |
68 | |
58 |