Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,25 @@ left-arrow | `"←"` | Left arrow string (HTML allowed).
right-arrow | `"→"` | Right arrow string (HTML allowed).
additions | `{ top: undefined, bottom: undefined }` | Template url for custom contents above and below each picker views (inside the dialog).
years-format | `"YYYY"` | Years format in `decade` view.
years-perLine | `4` | Years per line in `decade` view.
months-format | `"MMM"` | Months format in `year` view.
months-perLine | `4` | Months per line in `year` view.
days-format | `"D"` | Days format in `month` view.
days-perLine | `moment.weekdays().length` | Days per line in `month` view.
hours-format | `"HH:[00]"` | Hours format in `day` view.
hours-start | `0` | First rendered hour in `day` view (24h format).
hours-end | `23` | Last rendered hour in `day` view (24h format).
hours-perLine | `4` | Hours per line in `day` view.
minutes-format | <sup>2</sub> | Minutes format in `hour` view.
minutes-step | `5` | Step between each visible minute in `hour` view.
minutes-start | `0` | First rendered minute in `hour` view.
minutes-end | `59` | Last rendered minute in `hour` view.
minutes-perLine | `4` | Minutes per line in `hour` view.
seconds-format | `"ss"` | Seconds format in `minute` view.
seconds-step | `1` | Step between each visible second in `minute` view.
seconds-start | `0` | First rendered second in `minute` view.
seconds-end | `59` | Last rendered second in `minute` view.
seconds-perLine | `6` | Seconds per line in `minute` view.

## Notes

Expand Down
20 changes: 13 additions & 7 deletions dist/angular-moment-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -715,23 +715,29 @@ var Provider = (function () {
rightArrow: '&rarr;',
// Decade View
yearsFormat: 'YYYY',
yearsPerLine: 4,
// Year View
monthsFormat: 'MMM',
monthsPerLine: 4,
// Month View
daysFormat: 'D',
daysPerLine: moment.weekdays().length,
// Day View
hoursFormat: 'HH:[00]',
hoursStart: 0,
hoursEnd: 23,
hoursPerLine: 4,
// Hour View
minutesStep: 5,
minutesStart: 0,
minutesEnd: 59,
minutesPerLine: 4,
// Minute View
secondsFormat: 'ss',
secondsStep: 1,
secondsStart: 0,
secondsEnd: 59
secondsEnd: 59,
secondsPerLine: 6
};
}
Provider.prototype.options = function (options) {
Expand Down Expand Up @@ -759,7 +765,7 @@ var DayView = (function () {
this.$scope = $scope;
this.$ctrl = $ctrl;
this.provider = provider;
this.perLine = 4;
this.perLine = provider.hoursPerLine;
this.rows = {};
}
DayView.prototype.render = function () {
Expand Down Expand Up @@ -812,7 +818,7 @@ var DecadeView = (function () {
this.$scope = $scope;
this.$ctrl = $ctrl;
this.provider = provider;
this.perLine = 4;
this.perLine = provider.yearsPerLine;
this.rows = {};
}
DecadeView.prototype.render = function () {
Expand Down Expand Up @@ -865,7 +871,7 @@ var HourView = (function () {
this.$scope = $scope;
this.$ctrl = $ctrl;
this.provider = provider;
this.perLine = 4;
this.perLine = provider.minutesPerLine;
this.rows = {};
}
HourView.prototype.render = function () {
Expand Down Expand Up @@ -963,7 +969,7 @@ var MinuteView = (function () {
this.$scope = $scope;
this.$ctrl = $ctrl;
this.provider = provider;
this.perLine = 6;
this.perLine = provider.secondsPerLine;
this.rows = {};
}
MinuteView.prototype.render = function () {
Expand Down Expand Up @@ -1042,7 +1048,7 @@ var MonthView = (function () {
this.$scope = $scope;
this.$ctrl = $ctrl;
this.provider = provider;
this.perLine = moment.weekdays().length;
this.perLine = provider.daysPerLine;
this.rows = [];
}
MonthView.prototype.render = function () {
Expand Down Expand Up @@ -1101,7 +1107,7 @@ var YearView = (function () {
this.$scope = $scope;
this.$ctrl = $ctrl;
this.provider = provider;
this.perLine = 4;
this.perLine = provider.monthsPerLine;
this.rows = {};
}
YearView.prototype.render = function () {
Expand Down