Skip to content

Commit

Permalink
Fixed #40 - Calendar.vue : Time doesn't stop spinning
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Oct 1, 2019
1 parent c1fffaa commit 813fc98
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/components/calendar/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@
</template>
<div class="p-timepicker" v-if="showTime||timeOnly">
<div class="p-hour-picker">
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 0, 1)" @mouseup="onTimePickerElementMouseUp($event)">
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 0, 1)" @mouseup="onTimePickerElementMouseUp($event)"
@mouseout="onTimePickerElementMouseUp($event)">
<span class="pi pi-chevron-up"></span>
</button>
<span :style="{'display': currentHour < 10 ? 'inline': 'none'}">0</span><span>{{currentHour}}</span>
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 0, -1)" @mouseup="onTimePickerElementMouseUp($event)">
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 0, -1)" @mouseup="onTimePickerElementMouseUp($event)"
@mouseout="onTimePickerElementMouseUp($event)">
<span class="pi pi-chevron-down"></span>
</button>
</div>
Expand All @@ -80,11 +82,13 @@
</span>
</div>
<div class="p-minute-picker">
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 1, 1)" @mouseup="onTimePickerElementMouseUp($event)">
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 1, 1)" @mouseup="onTimePickerElementMouseUp($event)"
@mouseout="onTimePickerElementMouseUp($event)">
<span class="pi pi-chevron-up"></span>
</button>
<span :style="{'display': currentMinute < 10 ? 'inline': 'none'}">0</span><span>{{currentMinute}}</span>
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 1, -1)" @mouseup="onTimePickerElementMouseUp($event)">
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 1, -1)" @mouseup="onTimePickerElementMouseUp($event)"
@mouseout="onTimePickerElementMouseUp($event)">
<span class="pi pi-chevron-down"></span>
</button>
</div>
Expand All @@ -98,11 +102,13 @@
</span>
</div>
<div class="p-second-picker" v-if="showSeconds">
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 2, 1)" @mouseup="onTimePickerElementMouseUp($event)">
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 2, 1)" @mouseup="onTimePickerElementMouseUp($event)"
@mouseout="onTimePickerElementMouseUp($event)">
<span class="pi pi-chevron-up"></span>
</button>
<span :style="{'display': currentSecond < 10 ? 'inline': 'none'}">0</span><span>{{currentSecond}}</span>
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 2, -1)" @mouseup="onTimePickerElementMouseUp($event)">
<button class="p-link" @mousedown="onTimePickerElementMouseDown($event, 2, -1)" @mouseup="onTimePickerElementMouseUp($event)"
@mouseout="onTimePickerElementMouseUp($event)">
<span class="pi pi-chevron-down"></span>
</button>
</div>
Expand Down

0 comments on commit 813fc98

Please sign in to comment.