Skip to content

Migrating from ghl-ui TimePicker to HighRise TimePicker

HighRise HLTimePicker is a headless time picker with richer control over AM/PM display, timezones, and disabled states. Values are timestamps (number | null), and labels should be provided by surrounding form items instead of a label prop.

Component Implementation Changes

Import Changes

diff
- import { UITimePicker } from '@gohighlevel/ghl-ui'
+ import { HLTimePicker } from '@platform-ui/highrise'

Basic Usage Changes

diff
- <UITimePicker v-model="selectedTime" label="Select Time" />
+ <HLTimePicker
+   id="time-picker"
+   v-model:value="selectedTime"
+   format="HH:mm:ss"
+   :placeholder="{ time: 'Select time' }"
+ />

Form Integration Changes

diff
- <UIForm :model="formModel">
-   <UIFormItem label="Appointment">
-     <UITimePicker v-model="formModel.appointmentTime" label="Select Time" />
-   </UIFormItem>
- </UIForm>
+ <HLForm :model="formModel">
+   <HLFormItem label="Appointment" path="appointmentTime" required>
+     <HLTimePicker
+       id="appointment-time"
+       v-model:value="formModel.appointmentTime"
+       format="hh:mm a"
+       :show-a-m-p-m="true"
+       :placeholder="{ time: 'Select time' }"
+     />
+   </HLFormItem>
+ </HLForm>

Props Changes

ghl-ui PropHighRise PropNotes
v-model (value)v-model:valueUses timestamp (number) or null
defaultValuedefault-valueSame type as value; used as the initial timestamp
formatformatSame format tokens; combine with show-a-m-p-m to show AM/PM select
placeholder (string)placeholder.timeHighRise expects { time, timezone } object
timeZonetimezones + v-model:timezonePass array of { label, value, default? } and bind selected timezone
statusstatusForwarded to the inputs (error, warning, success)
size (small | medium | large)size (sm | md | lg)Size tokens align with other HighRise inputs
isHourDisabled / isMinuteDisabled / isSecondDisabledSame namesSame signature; passed through to the panel
show-a-m-p-mForces AM/PM select even when format already includes it
showCTA, autoClose, shortcutsControl footer actions and quick-pick shortcuts
disabled (boolean or { time, timezone, ampm })Disable specific parts independently
ampmSelectWidth, timeInputWidthFine-tune input widths

Events

ghl-ui EventHighRise EventNotes
@update:value@update:valueSame behavior
@confirm@update:confirmEmits timestamp when confirm is clicked
@update:formatted-valueEmits formatted string matching format
@update:clearEmits when cleared
@update:timezoneEmits selected timezone object
@update:ampmEmits AM / PM selection
@update:fallbackEmits when requested time is adjusted/blocked

Examples

Basic TimePicker

vue
<template>
  <HLTimePicker id="basic-timepicker" v-model:value="selectedTime" format="HH:mm:ss" :placeholder="{ time: 'Select time' }" />
</template>

<script setup>
import { ref } from 'vue'
import { HLTimePicker } from '@platform-ui/highrise'

const selectedTime = ref<number|null>(null)
</script>

TimePicker with AM/PM and Timezone

vue
<template>
  <HLTimePicker
    id="timepicker-12h"
    v-model:value="selectedTime"
    v-model:timezone="selectedTimezone"
    format="hh:mm a"
    :show-a-m-p-m="true"
    :timezones="timezones"
    :placeholder="{ time: 'Pick a time', timezone: 'Select timezone' }"
  />
</template>

<script setup>
import { ref } from 'vue'
import { HLTimePicker } from '@platform-ui/highrise'

const selectedTime = ref<number|null>(null)
const selectedTimezone = ref(null)
const timezones = [
  { label: 'UTC', value: 'UTC', default: true },
  { label: 'America/New_York', value: 'America/New_York' },
  { label: 'Europe/London', value: 'Europe/London' },
]
</script>

Disabled Segments and Validation

vue
<template>
  <HLTimePicker
    id="timepicker-disabled"
    v-model:value="selectedTime"
    format="HH:mm"
    :disabled="{ timezone: true }"
    :status="hasError ? 'error' : undefined"
    :placeholder="{ time: 'HH:mm' }"
    @update:clear="handleClear"
  />
</template>

<script setup>
import { ref, computed } from 'vue'
import { HLTimePicker } from '@platform-ui/highrise'

const selectedTime = ref<number|null>(null)
const hasError = computed(() => !selectedTime.value)
const handleClear = () => {
  selectedTime.value = null
}
</script>

Best Practices

  1. Bind with v-model:value; keep time values as timestamps for consistency.
  2. Supply format and show-a-m-p-m together when you want explicit AM/PM toggles.
  3. Use the placeholder object so time and timezone inputs are labeled correctly.
  4. Pass timezones plus v-model:timezone when you need timezone awareness.
  5. Disable specific parts (time, timezone, ampm) instead of the whole control when needed.