You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.5 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <client-only>
  3. <div>
  4. <div class="element tw-flex tw-items-center">
  5. <vue-timepicker format="HH" placeholder="--" input-width="90px" fixed-dropdown-button @input="inputHandler1"></vue-timepicker>
  6. <div class="tw-mx-[16px]">:</div>
  7. <vue-timepicker format="mm" placeholder="--" input-width="90px" fixed-dropdown-button @input="inputHandler2"></vue-timepicker>
  8. </div>
  9. </div>
  10. </client-only>
  11. </template>
  12. <script>
  13. export default {
  14. name: "elementTimePicker",
  15. data() {
  16. return{
  17. hour: '',
  18. branch: '',
  19. dateTime: '',
  20. }
  21. },
  22. methods: {
  23. inputHandler1(eventData) {
  24. this.hour = eventData.HH;
  25. if(this.hour!="" && this.branch!=""){
  26. this.$emit("change", this.hour+":"+this.branch);
  27. }
  28. },
  29. inputHandler2(eventData) {
  30. this.branch = eventData.mm;
  31. if(this.hour!="" && this.branch!=""){
  32. this.$emit("change", this.hour+":"+this.branch);
  33. }
  34. }
  35. }
  36. };
  37. </script>
  38. <style lang="scss" scoped>
  39. :deep() {
  40. .element {
  41. .vue__time-picker-dropdown ul li:not([disabled]).active,
  42. .vue__time-picker-dropdown ul li:not([disabled]).active:focus,
  43. .vue__time-picker-dropdown ul li:not([disabled]).active:hover,
  44. .vue__time-picker .dropdown ul li:not([disabled]).active,
  45. .vue__time-picker .dropdown ul li:not([disabled]).active:focus,
  46. .vue__time-picker .dropdown ul li:not([disabled]).active:hover {
  47. background: #f48800;
  48. color: #fff;
  49. }
  50. }
  51. .vue__time-picker input.display-time{
  52. padding: 20px !important;
  53. }
  54. }
  55. </style>