Skip to content

Commit

Permalink
Merge pull request #1853 from stopfstedt/new-wave-country_country-new…
Browse files Browse the repository at this point in the history
…-wave

removed max-date constraint on date picker for rollover start date
  • Loading branch information
jrjohnson authored Jul 8, 2016
2 parents 658f659 + 07665f8 commit b702b3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
20 changes: 1 addition & 19 deletions app/components/course-rollover.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,25 +117,7 @@ export default Component.extend(ValidationErrorDisplay, Validations, {
let startDate = moment().year(selectedYear).isoWeek(week).day(day).toDate();
this.setProperties({startDate});
}).restartable(),

minDate: computed('selectedYear', function(){
const selectedYear = this.get('selectedYear');
let today = moment();
if (isPresent(selectedYear)) {
today.year(selectedYear);
}
return today.dayOfYear(1).toDate();
}),

maxDate: computed('selectedYear', function(){
const selectedYear = this.get('selectedYear');
let today = moment();
if (isPresent(selectedYear)) {
today.year(selectedYear+1);
}
return today.dayOfYear(365).toDate();
}),


/**
* "disableDayFn" callback function pikaday.
* @link https://github.com/dbushell/Pikaday#configuration
Expand Down
3 changes: 1 addition & 2 deletions app/templates/components/course-rollover.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
{{pikaday-input
size=10
value=startDate
maxDate=maxDate
minDate=minDate
minDate=course.startDate
format='YYYY-MM-DD'
onSelection=(action (mut startDate))
options=(hash disableDayFn=disableDayFn course=course)
Expand Down

0 comments on commit b702b3f

Please sign in to comment.