This repository was archived by the owner on Mar 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 44[ ![ jsdelivr] ( https://data.jsdelivr.com/v1/package/npm/vue-flatpickr-component/badge?style=rounded )] ( https://www.jsdelivr.com/package/npm/vue-flatpickr-component )
55[ ![ npm-version] ( https://badgen.net/npm/v/vue-flatpickr-component )] ( https://www.npmjs.com/package/vue-flatpickr-component )
66[ ![ github-tag] ( https://badgen.net/github/tag/ankurk91/vue-flatpickr-component )] ( https://github.com/ankurk91/vue-flatpickr-component/ )
7- ![ build] ( https://github.com/ankurk91/vue-flatpickr-component/workflows/build/badge.svg )
7+ [ ![ build] ( https://github.com/ankurk91/vue-flatpickr-component/workflows/build/badge.svg )] ( https://github.com/ankurk91/vue-flatpickr-component/actions )
88[ ![ codecov] ( https://codecov.io/gh/ankurk91/vue-flatpickr-component/branch/master/graph/badge.svg )] ( https://codecov.io/gh/ankurk91/vue-flatpickr-component )
99[ ![ license] ( https://badgen.net/github/license/ankurk91/vue-flatpickr-component )] ( https://yarnpkg.com/en/package/vue-flatpickr-component )
1010
Original file line number Diff line number Diff line change 121121 </flat-pickr >
122122 </div >
123123
124+ <div class =" form-group" >
125+ <label >Month picker plugin</label >
126+ <flat-pickr class =" form-control"
127+ :config =" configs.monthSelect"
128+ v-model =" form.monthSelect" >
129+ </flat-pickr >
130+ </div >
131+
124132 <div class =" row" >
125133 <div class =" col-md-6" >
126134 <div class =" form-group" >
189197 // https://chmln.github.io/flatpickr/plugins/
190198 import ConfirmDatePlugin from ' flatpickr/dist/plugins/confirmDate/confirmDate.js' ;
191199 import ' flatpickr/dist/plugins/confirmDate/confirmDate.css' ;
200+ import monthSelectPlugin from ' flatpickr/dist/plugins/monthSelect/index.js'
201+ import ' flatpickr/dist/plugins/monthSelect/style.css'
192202
193203 // Override Global settings
194204 flatpickr .setDefaults ({
216226 allowInput: null ,
217227 dateStart: null ,
218228 dateEnd: null ,
229+ monthSelect: null ,
219230 },
220231 configs: {
221232 basic: {},
260271 },
261272 end: {
262273 minDate: null
274+ },
275+ monthSelect: {
276+ plugins: [
277+ new monthSelectPlugin ({
278+ shorthand: true ,
279+ dateFormat: " m/Y" ,
280+ })
281+ ]
263282 }
264283 },
265284 }
You can’t perform that action at this time.
0 commit comments