Skip to content

Commit

Permalink
Merge pull request #34 from tmthn/master
Browse files Browse the repository at this point in the history
Add dependent keys on time picker options property
  • Loading branch information
Francesco Novy committed Apr 12, 2019
2 parents 7281e09 + c659ea3 commit 36e29c2
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions addon/components/time-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,21 +217,28 @@ export default Component.extend({
* @type {amPm, step, minTime, maxTime}
* @protected
*/
options: computed(function() {
let amPm = get(this, 'amPm');
let minTime = get(this, 'minTime');
let maxTime = get(this, 'maxTime');
let step = get(this, 'step');
let selectStep = get(this, 'selectStep');

return {
amPm,
step,
selectStep,
minTime: parseTime(minTime),
maxTime: parseTime(maxTime)
};
}),
options: computed(
'step',
'amPm',
'minTime',
'maxTime',
'selectStep',
function() {
let amPm = get(this, 'amPm');
let minTime = get(this, 'minTime');
let maxTime = get(this, 'maxTime');
let step = get(this, 'step');
let selectStep = get(this, 'selectStep');

return {
amPm,
step,
selectStep,
minTime: parseTime(minTime),
maxTime: parseTime(maxTime)
};
}
),

/**
* The format which should be used.
Expand Down

0 comments on commit 36e29c2

Please sign in to comment.