@@ -23,6 +23,7 @@ const form = useForm(
2323 animal: {
2424 name: ' ' ,
2525 type: ' ' ,
26+ ageYears: null ,
2627 ageMonths: null ,
2728 },
2829 appointment: {
@@ -104,11 +105,11 @@ function createAnimalType(item: string) {
104105 <p class =" mb-2 text-2xl/12" >About you</p >
105106
106107 <!-- Client: name -->
107- <UFormField label =" Name" name =" client.name" required >
108+ <UFormField label =" Name" name =" client.name" class = " w-full " required >
108109 <UInput v-model =" form.client.name" placeholder =" Your name" class =" w-full" />
109110 </UFormField >
110111 <!-- Client: email-->
111- <UFormField label =" Email" name =" client.email" description =" Used to contact you about your appointment" required >
112+ <UFormField label =" Email" name =" client.email" description =" Used to contact you about your appointment" class = " w-full " required >
112113 <UInput v-model =" form.client.email" type =" email" placeholder =" Your email" class =" w-full" />
113114 </UFormField >
114115
@@ -118,11 +119,11 @@ function createAnimalType(item: string) {
118119 <p class =" mb-2 pt-0 text-2xl/12" >About your pet</p >
119120 <div class =" flex flex-col gap-4 md:flex-row" >
120121 <!-- Pet: name-->
121- <UFormField label =" Name" name =" animal.name" required >
122+ <UFormField label =" Name" name =" animal.name" class = " w-full " required >
122123 <UInput v-model =" form.animal.name" class =" w-full" placeholder =" Your pet's name" />
123124 </UFormField >
124125 <!-- Pet: type -->
125- <UFormField label =" Type" name =" animal.type" required >
126+ <UFormField label =" Type" name =" animal.type" class = " w-full " required >
126127 <UInputMenu
127128 v-model =" form.animal.type"
128129 placeholder =" Your pet type"
@@ -132,20 +133,34 @@ function createAnimalType(item: string) {
132133 class =" w-full"
133134 />
134135 </UFormField >
135- <!-- Pet: age -->
136- <UFormField label =" Age" name =" animal.ageMonths" hint =" in months" required >
137- <UInput v-model =" form.animal.ageMonths" class =" w-full" placeholder =" Your pet's age (in months)" />
138- </UFormField >
139136 </div >
140137
138+ <!-- Pet: age -->
139+ <UFormField label =" Age" required >
140+ <div class =" flex flex-col gap-2 sm:flex-row" >
141+ <UFormField name =" animal.ageYears" >
142+ <div class =" flex w-full gap-2 sm:items-center" >
143+ <UInput v-model =" form.animal.ageYears" placeholder =" Age in years..." class =" w-full" />
144+ <span class =" whitespace-nowrap text-gray-400" >year(s) and</span >
145+ </div >
146+ </UFormField >
147+ <UFormField name =" animal.ageMonths" >
148+ <div class =" flex w-full items-center gap-2" >
149+ <UInput v-model =" form.animal.ageMonths" placeholder =" ... and months" class =" w-full" />
150+ <span class =" whitespace-nowrap text-gray-400" >month(s)</span >
151+ </div >
152+ </UFormField >
153+ </div >
154+ </UFormField >
155+
141156 <USeparator class =" mb-0 py-6" />
142157
143158 <!-- Appointment -->
144159 <p class =" mb-2 pt-0 text-2xl/12" >About your visit</p >
145160 <div class =" flex flex-col gap-4 md:flex-row" >
146161 <div class =" space-y-2 md:w-1/3" >
147162 <!-- Appointment: date + time -->
148- <UFormField label =" Preferred Time" name =" appointment.preferredDate" required >
163+ <UFormField label =" Preferred Time" name =" appointment.preferredDate" class = " w-full " required >
149164 <UInput v-model =" form.appointment.preferredDate" type =" date" class =" w-full" />
150165 </UFormField >
151166 <UFormField name =" appointment.preferredTime" >
0 commit comments