I am using odoo v11. I have tried the following code it will work but the issue is when e select some other date after that I want to set the current date, it is not selectable.for example: first I have select date 17/04/2019 after that I will change 17th to today, then today's date is not selectable.
var DateWidget = require('web.datepicker').DateWidget;
DateWidget.include({
start: function(parent, options) {
var self = this;
if (this.__parentedParent.attrs.options.disable_past_date) {
self.options['minDate'] = moment(new Date());
}
this._super.apply(this, arguments);
}
});
Any help?