Topic: How do i configure the date picker to only show months and years
eshiett1995
pro asked 8 years ago
eshiett1995
pro answered 8 years ago
by using the on "set" event and calling the pickadate('picker').get('value') method.
var input = $('.datepicker').pickadate();
input.pickadate('picker').on('set', function(event) {
if ( event.select ) {
alert('it worked');
alert(input.pickadate('picker').get('select'));
console.log(input.pickadate('picker').get('select'));
alert(input.pickadate('picker').get('value'));
}
else if ( 'clear' in event ) {
//to_picker.set('min', false)
}
})
Mikołaj Smoleński
staff answered 8 years ago
Hi,
You can't disable days from date picker. Instead I suggest to make two selects - first with months and second with years.
Regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No