Skip to content

FormPickerWorklog

size
Input size
type:String
default:md
values:sm, md, lg
hoursText
Text describing the column with hours
type:String
default:Hours
minutesText
Text describing a column with minutes
type:String
default:Minutes
step
Defines the ranges of minutes
type:Number
default:5
values:1, 2, 3, 4, 5, 6, 10, 15, 20, 30

Examples

Worklog picker
html
<form-group>
  <form-field name="log" :model="log">
    <form-label text="Working time on the task:" />
    <form-picker-worklog :step="5" />
    <form-valid success="Great time!" />
  </form-field>
</form-group>
ts
import { computed } from 'vue'
import { useField, useForm } from 'vee-validate'
import { toTypedSchema } from '@vee-validate/zod'
import * as zod from 'zod'
import dayjs from 'dayjs'
const { handleSubmit } = useForm()

const onSubmit = handleSubmit()
const fieldSchema = toTypedSchema(
  zod
    .number({
      required_error: 'The value of the logo is required',
      invalid_type_error: 'This is not a correct format'
    })
    .positive()
)
const log = useField('log', fieldSchema, { initialValue: 690 })