You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using nativescript-vue and several <DatePickerField>'s in a filter/search. After clearing/resetting the filter I need it to show the hint text or an empty field.
When setting date to an empty string :date="''" the component shows the value 01.01.1970, so my method to clear it is by re-rendering the component and give each a key :key="keyVar1" with a random value this.keyVar1 = Math.random().toString(36).substring(2,15);.
Is there a more native method or is re-rendering the way to go here?
The text was updated successfully, but these errors were encountered:
I found out, that it is possible to pass undefined to date:
:date="undefined"
If this happens, the value of hint property will be shown preferred. Imo the same behaviour should happen with null and empty strings. Also this behaviour should be documented somewhere.
So another solution can be to set hint to e.g. hint=" " and pass undefinded to date.
I am using
nativescript-vue
and several<DatePickerField>
's in a filter/search. After clearing/resetting the filter I need it to show the hint text or an empty field.When setting date to an empty string
:date="''"
the component shows the value01.01.1970
, so my method to clear it is by re-rendering the component and give each a key:key="keyVar1"
with a random valuethis.keyVar1 = Math.random().toString(36).substring(2,15);
.Is there a more native method or is re-rendering the way to go here?
The text was updated successfully, but these errors were encountered: