Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker: fix properties #3855

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions packages/docs/src/data/api/date-picker-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ export const api: Api = {
default: false,
description: 'Affiche le `VTextField` en mode `outlined`.'
},
{
name: 'readonly',
type: 'boolean',
default: false,
description: 'Désactive la modification du champ.'
},
{
name: 'text-field-activator',
type: 'boolean',
default: false,
description: 'Affiche le calendrier lors du clic sur le `VTextField`.'
},
{
name: 'no-calendar',
type: 'boolean',
Expand All @@ -39,12 +51,6 @@ export const api: Api = {
default: false,
description: 'Affiche le bouton du calendrier dans le `VTextField`.'
},
{
name: 'text-field-activator',
type: 'boolean',
default: false,
description: 'Affiche le calendrier lors du clic sur le `VTextField`.'
},
DavidFyon marked this conversation as resolved.
Show resolved Hide resolved
{
name: 'text-field-class',
type: [
Expand Down
6 changes: 6 additions & 0 deletions packages/docs/src/data/api/date-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ export const api: Api = {
default: false,
description: 'Affiche le `VTextField` en mode `outlined`.'
},
{
name: 'readonly',
type: 'boolean',
default: false,
description: 'Désactive la modification du champ.'
},
{
name: 'no-calendar',
type: 'boolean',
Expand Down
6 changes: 6 additions & 0 deletions packages/docs/src/data/api/period-field-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export const api: Api = {
description: 'Désactive le champ.',
default: false
},
{
name: 'readonly',
type: 'boolean',
default: false,
description: 'Désactive la modification du champ.'
},
{
name: 'date-format',
type: 'string',
Expand Down
14 changes: 13 additions & 1 deletion packages/docs/src/data/api/period-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,22 @@ export const api: Api = {
description: 'Désactive le champ.',
default: false
},
{
name: 'readonly',
type: 'boolean',
default: false,
description: 'Désactive la modification du champ.'
},
{
name: 'text-field-activator',
type: 'boolean',
default: false,
description: 'Affiche le calendrier lors du clic sur le `VTextField`.'
},
...customizable(`{
from: 'DatePicker',
to: 'DatePicker'
}`)
}`),
],
events: [
{
Expand Down
6 changes: 6 additions & 0 deletions packages/vue-dot/src/patterns/DatePicker/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
:error-messages="textFieldOptions.errorMessages || errorMessages"
:error.sync="internalErrorProp"
:disabled="disabled"
:readonly="readonly"
class="vd-date-picker-text-field"
@blur="textFieldBlur"
@click.native="textFieldClicked"
Expand Down Expand Up @@ -95,6 +96,7 @@
:max="options.datePicker.max || max"
:min="options.datePicker.min || min"
:events="calendarEvents"
:readonly="readonly"
@change="saveFromCalendar"
/>
</VMenu>
Expand Down Expand Up @@ -154,6 +156,10 @@
textFieldClass: {
type: [String, Array] as PropType<string | string[]>,
default: undefined
},
readonly: {
type: Boolean,
default: false
}
}
});
Expand Down
12 changes: 12 additions & 0 deletions packages/vue-dot/src/patterns/PeriodField/PeriodField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
:vuetify-options="datePickerOptions.from"
:outlined="outlined"
:disabled="disabled"
:readonly="readonly"
:text-field-activator="textFieldActivator"
text-field-class="vd-period-field-picker flex-grow-1 ma-2"
@change="dateUpdated"
/>
Expand All @@ -13,6 +15,8 @@
v-model="periodValue.to"
:outlined="outlined"
:disabled="disabled"
:readonly="readonly"
:text-field-activator="textFieldActivator"
:start-date="periodValue.from"
:vuetify-options="toPickerOptions"
text-field-class="vd-period-field-picker flex-grow-1 ma-2"
Expand Down Expand Up @@ -49,6 +53,14 @@
disabled: {
type: Boolean,
default: false
},
readonly: {
type: Boolean,
default: false
},
textFieldActivator: {
type: Boolean,
default: false
}
}
});
Expand Down
Loading