Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit e6533f6

Browse files
SlyNetankurk91
authored andcommitted
Allow override input class, #18
1 parent c69e4e3 commit e6533f6

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ This example is based on Bootstrap 3 [input group](http://getbootstrap.com/compo
6666
v-model="date"
6767
placeholder="Select date"
6868
:config="config"
69-
:required="true"
70-
input-class="date-input"
69+
:required="true"
7170
name="date">
7271
</flat-pickr>
7372
<div class="input-group-btn">
@@ -134,7 +133,7 @@ The component accepts these props:
134133
| v-model / value | String / Date Object / Array / null| `null` | Set or Get date-picker value (required) |
135134
| config | Object | `{wrap:false}` | Flatpickr configuration [options](https://chmln.github.io/flatpickr/options/)|
136135
| placeholder | String | `''` | Set placeholder on input |
137-
| input-class | String / Object | `''` | Add CSS class to input |
136+
| input-class | String / Object | `'form-control input'` | Set CSS class to input |
138137
| name | String | `'date-time'` | Set input field name |
139138
| required | Boolean | `false` | Make input field required |
140139
| id | String | `''` | Set input field id |

examples/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
placeholder="Select date"
5656
:config="configs.wrap"
5757
:required="true"
58-
input-class="date-input-class"
58+
input-class="form-control input date-input"
5959
name="date-name"
6060
>
6161
</flat-pickr>

src/component.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<template>
22

33
<input type="text"
4-
class="form-control input"
54
:id="id"
65
:class="inputClass"
76
:name="name"
@@ -38,7 +37,7 @@
3837
},
3938
inputClass: {
4039
type: [String, Object],
41-
default: ''
40+
default: 'form-control input'
4241
},
4342
name: {
4443
type: String,

0 commit comments

Comments
 (0)