Skip to content

Commit

Permalink
fix: remove single am/pm usage to always show both am/pm (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamDASILVA authored Jun 20, 2020
1 parent 458ff1b commit 688211a
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,10 @@
return ArrayMinuteRange(0, 60, twoDigit, this.minuteInterval, this._disabledMinutes)
},
apms () {
const ampm = this.isTwelveFormat
? this.minTime
? moment(this.minTime, 'hh:mm a').format('a')
: this.maxTime
? moment(this.maxTime, 'hh:mm a').format('a')
: ''
: ''
const upper = ampm
? [{ value: ampm.toUpperCase(), item: ampm.toUpperCase() }]
: [{ value: 'AM', item: 'AM' }, { value: 'PM', item: 'PM' }]
const lower = ampm
? [{ value: ampm, item: ampm }]
: [{ value: 'am', item: 'am' }, { value: 'pm', item: 'pm' }]
return this.isTwelveFormat
? this.format.includes('A') ? upper : lower
? this.format.includes('A')
? [{ value: 'AM', item: 'AM' }, { value: 'PM', item: 'PM' }]
: [{ value: 'am', item: 'am' }, { value: 'pm', item: 'pm' }]
: null
},
columns () {
Expand Down

0 comments on commit 688211a

Please sign in to comment.