@fy-/fws-vue 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -229,7 +229,7 @@ function selectFile(e: Event) {
229
229
  id="birthdateFWS"
230
230
  v-model="state.userData.Birthdate"
231
231
  class="mb-4"
232
- type="date"
232
+ type="datepicker"
233
233
  :dp-options="{
234
234
  format: 'yyyy-mm-dd',
235
235
  }"
@@ -138,7 +138,7 @@ const patchUser = async () => {
138
138
  :dp-options="{
139
139
  format: 'yyyy-mm-dd',
140
140
  }"
141
- type="date"
141
+ type="datepicker"
142
142
  :label="$t('fws_birthdate_label')"
143
143
  :error-vuelidate="v$.userData.Birthdate.$errors"
144
144
  />
@@ -11,6 +11,7 @@ import {
11
11
  import type { ErrorObject } from "@vuelidate/core";
12
12
  import { useTranslation } from "../../composables/translations";
13
13
  import DefaultTagInput from "./DefaultTagInput.vue";
14
+ import VueDatePicker from "@vuepic/vue-datepicker";
14
15
 
15
16
  type modelValueType = string | number | string[] | number[] | undefined;
16
17
 
@@ -167,6 +168,39 @@ defineExpose({ focus, blur, getInputRef });
167
168
  @blur="handleBlur"
168
169
  />
169
170
  </div>
171
+ <div v-if="type == 'datepicker'">
172
+ <label
173
+ :for="id"
174
+ v-if="label || placeholder"
175
+ class="block mb-2 text-sm font-medium text-fv-neutral-900 dark:text-white"
176
+ >{{ label ? label : placeholder }}
177
+ </label>
178
+ <div class="relative max-w-xl">
179
+ <div
180
+ class="absolute inset-y-0 start-0 flex items-center ps-3.5 pointer-events-none"
181
+ >
182
+ <svg
183
+ class="w-4 h-4 text-fv-neutral-500 dark:text-fv-neutral-400"
184
+ aria-hidden="true"
185
+ xmlns="http://www.w3.org/2000/svg"
186
+ fill="currentColor"
187
+ viewBox="0 0 20 20"
188
+ >
189
+ <path
190
+ d="M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"
191
+ />
192
+ </svg>
193
+ </div>
194
+ <VueDatePicker
195
+ v-model="model"
196
+ auto-apply
197
+ :placeholder="placeholder"
198
+ year-first
199
+ dark
200
+ :enable-time-picker="false"
201
+ ></VueDatePicker>
202
+ </div>
203
+ </div>
170
204
 
171
205
  <div v-if="type == 'chips' || type == 'tags'">
172
206
  <label
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {