From dfd502f31bc29da55730f78260e8fc1e621974a3 Mon Sep 17 00:00:00 2001 From: "edin.fazlic" Date: Tue, 16 Feb 2016 11:57:06 +0100 Subject: [PATCH] fix(daypicker): text center align in bootstrap 4 --- components/datepicker/daypicker.ts | 56 ++++++++++++++++++------------ 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/components/datepicker/daypicker.ts b/components/datepicker/daypicker.ts index b4ba9f82c3..0a62aca55c 100644 --- a/components/datepicker/daypicker.ts +++ b/components/datepicker/daypicker.ts @@ -7,23 +7,37 @@ import {DatePickerInner} from './datepicker-inner'; //write an interface for template options const TEMPLATE_OPTIONS:any = { [Ng2BootstrapTheme.BS4]: { - DAY_BUTTON: ` - + DAY_TITLE: ` + {{labelz.abbr}} + `, + WEEK_ROW: ` + {{ weekNumbers[index] }} + + + + ` }, [Ng2BootstrapTheme.BS3]: { - DAY_BUTTON: ` - + DAY_TITLE: ` + {{labelz.abbr}} + `, + WEEK_ROW: ` + {{ weekNumbers[index] }} + + + + ` } }; @@ -32,7 +46,7 @@ const CURRENT_THEME_TEMPLATE:any = TEMPLATE_OPTIONS[Ng2BootstrapConfig.theme || @Component({ selector: 'daypicker, [daypicker]', - template: ` + template: ` @@ -66,17 +80,13 @@ const CURRENT_THEME_TEMPLATE:any = TEMPLATE_OPTIONS[Ng2BootstrapConfig.theme || - - + + ${CURRENT_THEME_TEMPLATE.DAY_TITLE} - - - + ${CURRENT_THEME_TEMPLATE.WEEK_ROW}
{{labelz.abbr}}
{{ weekNumbers[index] }} - ${CURRENT_THEME_TEMPLATE.DAY_BUTTON} -
@@ -90,7 +100,7 @@ export class DayPicker implements OnInit { public rows:Array = []; public weekNumbers:Array = []; - constructor(public datePicker: DatePickerInner) { + constructor(public datePicker:DatePickerInner) { } /*private getDaysInMonth(year:number, month:number) {