Skip to content

Commit

Permalink
fix: handling of empty values in NcDateTimePickerNative
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
  • Loading branch information
st3iny committed Oct 4, 2023
1 parent 41e2117 commit 314c156
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -2,6 +2,7 @@
- @copyright Copyright (c) 2022 Julia Kirschenheuter <julia.kirschenheuter@nextcloud.com>
-
- @author Julia Kirschenheuter <julia.kirschenheuter@nextcloud.com>
- @author Richard Steinmetz <richard@steinmetz.cloud>
-
- @license GNU AGPL version 3 or any later version
-
Expand Down Expand Up @@ -163,10 +164,11 @@ export default {
* The date is – like the `Date` object in JavaScript – tied to UTC.
* The selected time zone does not have an influence of the selected time and date value.
* You have to translate the time yourself when you want to factor in time zones.
* Pass null to clear the input field.
*/
value: {
type: Date,
required: true,
default: null,
},
/**
Expand Down Expand Up @@ -265,7 +267,7 @@ export default {
*
* @return {string} empty string
*/
return this.$emit('input', '')
return this.$emit('input', null)
}
if (this.type === 'time') {
const time = $event.target.value
Expand Down

0 comments on commit 314c156

Please sign in to comment.