diff --git a/primefaces/src/main/resources/META-INF/resources/primefaces/datepicker/1-datepicker.js b/primefaces/src/main/resources/META-INF/resources/primefaces/datepicker/1-datepicker.js index 8637c59722..230a1c62ce 100644 --- a/primefaces/src/main/resources/META-INF/resources/primefaces/datepicker/1-datepicker.js +++ b/primefaces/src/main/resources/META-INF/resources/primefaces/datepicker/1-datepicker.js @@ -383,6 +383,9 @@ PrimeFaces.widget.DatePicker = PrimeFaces.widget.BaseWidget.extend({ ] } if (lazy) { + if (!this.panel.parent().is("div.ui-state-disabled")) { + this.panel.wrap("
"); + } options.onsuccess = function(responseXML, status, xhr) { PrimeFaces.ajax.Response.handle(responseXML, status, xhr, { widget: $this, @@ -407,6 +410,9 @@ PrimeFaces.widget.DatePicker = PrimeFaces.widget.BaseWidget.extend({ pdp.options.dateStyleClasses = dateStyleClasses; $this.setDisabledDates(disabledDates); $this.setEnabledDates(enabledDates); + if ($this.panel.parent().is("div.ui-state-disabled")) { + $this.panel.unwrap(); + } } }); return true; diff --git a/primefaces/src/main/resources/META-INF/resources/primefaces/datepicker/datepicker.css b/primefaces/src/main/resources/META-INF/resources/primefaces/datepicker/datepicker.css index 00566ee593..fc809628db 100644 --- a/primefaces/src/main/resources/META-INF/resources/primefaces/datepicker/datepicker.css +++ b/primefaces/src/main/resources/META-INF/resources/primefaces/datepicker/datepicker.css @@ -126,4 +126,11 @@ .p-datepicker-panel .ui-datepicker-buttonbar .ui-g-6 { text-align: center; -} \ No newline at end of file +} + +body .ui-state-disabled.ui-datepicker-disabled { + opacity: 1; +} +.ui-datepicker-disabled tbody a { + opacity: .4; +}