File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -122,12 +122,23 @@ export default {
122122 minuteOptions () {
123123 const options = [];
124124 let m = 0 ;
125+ let added = false ;
125126 while (m <= 59 ) {
126127 options .push ({
127128 value: m,
128129 label: pad (m, 2 ),
129130 });
131+ added = added || m === this .minutes ;
130132 m += this .minuteIncrement ;
133+ // Add disabled option if interval has skipped it
134+ if (! added && m > this .minutes ) {
135+ added = true ;
136+ options .push ({
137+ value: this .minutes ,
138+ label: pad (this .minutes , 2 ),
139+ disabled: true ,
140+ });
141+ }
131142 }
132143 return options;
133144 },
Original file line number Diff line number Diff line change 55 v-for =" option in options"
66 :key =" option.value"
77 :value =" option.value"
8+ :disabled =" option.disabled"
89 >{{ option.label }}</option
910 >
1011 </select >
You can’t perform that action at this time.
0 commit comments