Skip to content

Commit

Permalink
Merge pull request #3806 from nextcloud/fix/noid/native-datepicker-in…
Browse files Browse the repository at this point in the history
…put-class

Allow to add class to native datepicker input
  • Loading branch information
raimund-schluessler committed Feb 22, 2023
2 parents 1516ea5 + 6d7dd57 commit 7ac495d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/NcActionInput/NcActionInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ For the multiselect component, all events will be passed through. Please see the
:id="idNativeDateTimePicker"
:value="value"
:type="nativeDatePickerType"
:class="{ focusable: isFocusable }"
:input-class="{ focusable: isFocusable }"
class="action-input__datetimepicker"
v-bind="$attrs"
@input="$emit('input', $event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ All available types are: 'date', 'datetime-local', 'month', 'time' and 'week', p
<label :class="{ 'hidden-visually': hideLabel }" :for="id">{{ label }}</label>
<input :id="id"
class="native-datetime-picker--input"
:class="inputClass"
:type="type"
:value="formattedValue"
:min="formattedMin"
Expand Down Expand Up @@ -218,6 +219,14 @@ export default {
type: Boolean,
default: false,
},
/**
* Class to add to the input field.
* Necessary to use NcDateTimePickerNative in the NcActionInput component.
*/
inputClass: {
type: [Object, String],
default: '',
},
},
emits: [
Expand Down

0 comments on commit 7ac495d

Please sign in to comment.