angular-moment-picker icon indicating copy to clipboard operation
angular-moment-picker copied to clipboard

Wrong disabled class on years with min-date, max-date settings

Open csimpi opened this issue 5 years ago • 1 comments

1999 is disabled despite the date range:

image

Prev page, 1999 is enabled but 1989 is disabled. It seems every first and last year is disabled without any reason:

image

csimpi avatar Sep 11 '18 19:09 csimpi

Update, I changed this line !selectable || [0, 11].indexOf(y) >= 0 ? 'disabled' : utility_1.isValidMoment(this.$ctrl.$modelValue) && year.isSame(this.$ctrl.$modelValue, 'year') ? 'selected' : '' to this: !selectable ? 'disabled' : utility_1.isValidMoment(this.$ctrl.$modelValue) && year.isSame(this.$ctrl.$modelValue, 'year') ? 'selected' : ''

in the DecadeView.prototype.render() runction

Basically I removed this condition: || [0, 11].indexOf(y) >= 0

I don't know if it has any goal let me know if I misunderstood something. Thx

csimpi avatar Sep 11 '18 20:09 csimpi