(js) Improve recurrence editor

pull/16/merge
Francis Lachapelle 2017-03-23 14:01:28 -04:00
parent c57f42b44b
commit 4dcc1af46a
2 changed files with 3 additions and 2 deletions

View File

@ -55,7 +55,7 @@
<md-grid-list md-cols="7" md-row-height="2em" md-gutter="0.5em"
flex="50" flex-sm="80" flex-xs="100"
ng-model="editor.component.repeat.monthdays"
ng-required="editor.component.repeat.month.type == 'bymonthday'"
ng-required="editor.recurrenceMonthDaysAreRequired()"
sg-toggle-grid="sg-toggle-grid">
<md-grid-tile value="1">1</md-grid-tile>
<md-grid-tile value="2">2</md-grid-tile>

View File

@ -265,7 +265,8 @@
}
function recurrenceMonthDaysAreRequired() {
return vm.component.repeat.frequency == 'monthly' &&
return vm.component &&
vm.component.repeat.frequency == 'monthly' &&
vm.component.repeat.month.type == 'bymonthday';
}