Skip to content

Commit

Permalink
Allow to add class to native datepicker input
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
  • Loading branch information
raimund-schluessler committed Feb 22, 2023
1 parent 6755d7f commit 6d7dd57
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 6d7dd57

Please sign in to comment.