Open Ahnaf opened 3 years ago
In live demo I did not find option for previous year, for example, to input Date of Birth.
If you are talking about navigating to previous years, see this https://vue-tailwind-picker.netlify.app/options/#star-date
To determine the start date, the previous date will be disabled
Well, how to enable navigation to previous dates? Also, is there some guide how to change translate/local/lang?
Okay, I found a solution, Import picker directly to project resources and make some changes in core To enable previous date set startDate:
import VueDatePicker from './vue-tailwind-picker'
export default {
components: {
VueDatePicker
},
data(){
return {
startDate: '2019-01-01',
checkin: '',
}
}
}
Then look into core mounted() hook (vue-tailwind-picker.vue) and add few lines to set current date to now:
mounted() {
if (this.init) this.emit();
this.changePicker(dayjs(new Date()));
this.showPicker = !this.showPicker
},
To change locale go to vue-tailwind-picker.vue and add this lines:
import * as locale from 'dayjs/locale/ru'
dayjs.locale(locale)
I'm not sure if it is professional solving, but it works
In live demo I did not find option for previous year, for example, to input Date of Birth.