Hide Bootstrap Datetimepicker Decade view

Many people want to hide Bootstrap Datetimepicker's decade view. Here's the simplest way to do this...

1. Open bootstrap-datetimepicker.js in editor.

2. Search this line "updateYears = function ()" (without quotes). The code at that place is -



3. Comment this line " yearsViewHeader.eq(1).attr('title', options.tooltips.selectDecade); " and add a new line " yearsViewHeader.eq(1).addClass('disabled'); "  just below the line" yearsView.find('.disabled').removeClass('disabled'); ". So the new code looks like this (changes are highlighted) -


4. All set to go, save the changes and open the page in browser, press Ctrl + F5 to clear the cache and get new copy of bootstrap-datetimepicker.js .

No comments:

Post a Comment