Calendar | placeholder props added
parent
72bc87cf65
commit
62f45a7622
|
@ -227,6 +227,12 @@ const CalendarProps = [
|
|||
default: "body",
|
||||
description: 'A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are "body" for document body and "self" for the element itself.'
|
||||
},
|
||||
{
|
||||
name: "placeholder",
|
||||
type: "string",
|
||||
default: "null",
|
||||
description: "Placeholder text for the input."
|
||||
},
|
||||
{
|
||||
name: "id",
|
||||
type: "string",
|
||||
|
|
|
@ -237,6 +237,10 @@ export interface CalendarProps {
|
|||
* When present, it specifies that an input field is read-only.
|
||||
*/
|
||||
readonly?: boolean | undefined;
|
||||
/**
|
||||
* Placeholder text for the input.
|
||||
*/
|
||||
placeholder?: string | undefined;
|
||||
/**
|
||||
* A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are 'body' for document body and 'self' for the element itself.
|
||||
* @see CalendarAppendToType
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<span ref="container" :id="id" :class="containerClass">
|
||||
<input :ref="inputRef" v-if="!inline" type="text" role="combobox" :id="inputId" :class="['p-inputtext p-component', inputClass]" :style="inputStyle"
|
||||
<input :ref="inputRef" v-if="!inline" type="text" role="combobox" :id="inputId" :class="['p-inputtext p-component', inputClass]" :style="inputStyle" :placeholder="placeholder"
|
||||
aria-autocomplete="none" aria-haspopup="dialog" :aria-expanded="overlayVisible" :aria-controls="panelId" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" inputmode="none"
|
||||
@input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" :readonly="!manualInput" :tabindex="0" v-bind="inputProps">
|
||||
<CalendarButton v-if="showIcon" :icon="icon" class="p-datepicker-trigger" :disabled="disabled" @click="onButtonClick" type="button" :aria-label="$primevue.config.locale.chooseDate" aria-haspopup="dialog" :aria-expanded="overlayVisible" :aria-controls="panelId"/>
|
||||
|
@ -317,6 +317,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
id: null,
|
||||
inputId: null,
|
||||
inputClass: null,
|
||||
|
|
|
@ -429,6 +429,12 @@ export default {
|
|||
<td>A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are "body" for document body
|
||||
and "self" for the element itself.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>placeholder</td>
|
||||
<td>string</td>
|
||||
<td>null</td>
|
||||
<td>Default text to display when no option is selected.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>id</td>
|
||||
<td>string</td>
|
||||
|
|
Loading…
Reference in New Issue