Prefer nested var over nested let

This commit is contained in:
Felix Livni
2017-03-04 10:56:07 -08:00
committed by Manu Mtz.-Almeida
parent eff420f4c7
commit 769e7dc2aa

View File

@ -594,7 +594,6 @@ export class DateTime extends Ion implements AfterContentInit, ControlValueAcces
* @private
*/
validate(picker: Picker) {
let i: number;
let today = new Date();
let columns = picker.getColumns();
@ -630,7 +629,7 @@ export class DateTime extends Ion implements AfterContentInit, ControlValueAcces
if (monthCol) {
// enable/disable which months are valid
// to show within the min/max date range
for (let i = 0; i < monthCol.options.length; i++) {
for (var i = 0; i < monthCol.options.length; i++) {
monthOpt = monthCol.options[i];
// loop through each month and see if it
@ -658,7 +657,7 @@ export class DateTime extends Ion implements AfterContentInit, ControlValueAcces
if (isPresent(selectedMonth)) {
// enable/disable which days are valid
// to show within the min/max date range
for (let i = 0; i < dayCol.options.length; i++) {
for (var i = 0; i < dayCol.options.length; i++) {
dayOpt = dayCol.options[i];
// loop through each day and see if it
@ -672,7 +671,7 @@ export class DateTime extends Ion implements AfterContentInit, ControlValueAcces
} else {
// enable/disable which numbers of days to show in this month
for (let i = 0; i < dayCol.options.length; i++) {
for (var i = 0; i < dayCol.options.length; i++) {
dayOpt = dayCol.options[i];
dayOpt.disabled = (numDaysInMonth < dayOpt.value);
}