Open baermathias opened 4 years ago
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.
Maybe this info helps somebody.
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?