Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
refactor(datepicker): order config options
Browse files Browse the repository at this point in the history
Closes #5222
  • Loading branch information
Foxandxss authored and wesleycho committed Jan 12, 2016
1 parent 1038c54 commit 3bacd45
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
.value('$datepickerSuppressError', false)

.constant('uibDatepickerConfig', {
datepickerMode: 'day',
formatDay: 'dd',
formatMonth: 'MMMM',
formatYear: 'yyyy',
formatDayHeader: 'EEE',
formatDayTitle: 'MMMM yyyy',
formatMonthTitle: 'yyyy',
datepickerMode: 'day',
minMode: 'day',
maxDate: null,
maxMode: 'year',
minDate: null,
minMode: 'day',
ngModelOptions: {},
shortcutPropagation: false,
showWeeks: true,
startingDay: 0,
yearRows: 4,
yearColumns: 5,
minDate: null,
maxDate: null,
shortcutPropagation: false,
ngModelOptions: {}
yearRows: 4
})

.controller('UibDatepickerController', ['$scope', '$attrs', '$parse', '$interpolate', '$log', 'dateFilter', 'uibDatepickerConfig', '$datepickerSuppressError', 'uibDateParser',
Expand Down Expand Up @@ -553,6 +553,12 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
})

.constant('uibDatepickerPopupConfig', {
altInputFormats: [],
appendToBody: false,
clearText: 'Clear',
closeOnDateSelection: true,
closeText: 'Done',
currentText: 'Today',
datepickerPopup: 'yyyy-MM-dd',
datepickerPopupTemplateUrl: 'uib/template/datepicker/popup.html',
datepickerTemplateUrl: 'uib/template/datepicker/datepicker.html',
Expand All @@ -561,14 +567,8 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss',
'month': 'yyyy-MM'
},
currentText: 'Today',
clearText: 'Clear',
closeText: 'Done',
closeOnDateSelection: true,
appendToBody: false,
showButtonBar: true,
onOpenFocus: true,
altInputFormats: []
showButtonBar: true
})

.controller('UibDatepickerPopupController', ['$scope', '$element', '$attrs', '$compile', '$parse', '$document', '$rootScope', '$uibPosition', 'dateFilter', 'uibDateParser', 'uibDatepickerPopupConfig', '$timeout', 'uibDatepickerConfig',
Expand Down

0 comments on commit 3bacd45

Please sign in to comment.