Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save clovisdasilvaneto/b14f703ad2869c87e16ebfc6210c5031 to your computer and use it in GitHub Desktop.
Save clovisdasilvaneto/b14f703ad2869c87e16ebfc6210c5031 to your computer and use it in GitHub Desktop.
Liferay.component(
name,
function() {
var datepicker = new A.DatePicker({
trigger: '#' + inputId,
mask: '%d/%m/%Y',
popover: {
zIndex: 1
},
after: {
selectionChange: function (event) {
var ipt = this.get('activeInput');
if (ipt.ancestor('.not-future-date')) {
Liferay.notFuctureDateVaccination(ipt, event);
} else if (ipt.ancestor('.future-date')) {
Liferay.isFuctureDateVaccination(ipt, event);
}
}
}
});
return datepicker;
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment