diff --git a/src/app/components/calendar/calendar.ts b/src/app/components/calendar/calendar.ts index 684f0ea332c..c7ce7104896 100644 --- a/src/app/components/calendar/calendar.ts +++ b/src/app/components/calendar/calendar.ts @@ -152,48 +152,60 @@ export const CALENDAR_VALUE_ACCESSOR: any = {
- +
- {{ getMonthName(month.month) }} - - + {{ yearPickerValues()[0] }} - {{ yearPickerValues()[yearPickerValues().length - 1] }}
@@ -203,7 +215,7 @@ export const CALENDAR_VALUE_ACCESSOR: any = {
- +
@@ -281,8 +293,10 @@ export const CALENDAR_VALUE_ACCESSOR: any = {
0{{ currentHour }}
0{{ currentMinute }} @@ -361,7 +382,10 @@ export const CALENDAR_VALUE_ACCESSOR: any = {
0{{ currentSecond }} {{ timeSeparator }}
- + {{ pm ? 'PM' : 'AM' }} - + -
- - + +
diff --git a/src/app/components/calendar/style/datepickerstyle.ts b/src/app/components/calendar/style/datepickerstyle.ts index f089e49d50a..a5bc57c667a 100644 --- a/src/app/components/calendar/style/datepickerstyle.ts +++ b/src/app/components/calendar/style/datepickerstyle.ts @@ -366,6 +366,20 @@ position: relative; .p-datepicker-timeonly .p-datepicker-time-picker { border-top: 0 none; } + +.p-datepicker-calendar:not(:first-child):not(:last-child) .p-datepicker-header { + justify-content: center; +} + +/* For PrimeNG */ + +p-calendar.ng-invalid.ng-dirty .p-datepicker.p-inputwrapper .p-inputtext{ + border-color: ${dt('inputtext.invalid.border.color')}; +} + +p-datepicker.ng-invalid.ng-dirty .p-datepicker.p-inputwrapper .p-inputtext{ + border-color: ${dt('inputtext.invalid.border.color')}; +} `; const inlineStyles = { @@ -423,7 +437,7 @@ const classes = { 'p-datepicker-day': true, 'p-datepicker-day-selected': !instance.isRangeSelection() && instance.isSelected(date) && date.selectable, 'p-disabled': instance.disabled || !date.selectable, - selectedDayClass: true + [selectedDayClass]: true }; }, monthView: 'p-datepicker-month-view',