Fixed #2152 - New input event for Calendar
parent
7441f842af
commit
5cbd68d720
|
@ -249,6 +249,17 @@ const CalendarProps = [
|
|||
];
|
||||
|
||||
const CalendarEvents = [
|
||||
{
|
||||
name: "input",
|
||||
description: "Callback to invoke when input field is being typed.",
|
||||
arguments: [
|
||||
{
|
||||
name: "event",
|
||||
type: "object",
|
||||
description: "New date"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "date-select",
|
||||
description: "Callback to invoke when a date is selected.",
|
||||
|
|
|
@ -276,6 +276,11 @@ export declare type CalendarEmits = {
|
|||
* @param {CalendarValueType} value - New value.
|
||||
*/
|
||||
'update:modelValue': (value: CalendarValueType) => void;
|
||||
/**
|
||||
* Callback to invoke when input field is being typed.
|
||||
* @param {Event} event - Browser event
|
||||
*/
|
||||
'input': (event: Event) => void;
|
||||
/**
|
||||
* Callback to invoke when a date is selected.
|
||||
* @param {Date} value - Selected value.
|
||||
|
|
|
@ -2171,6 +2171,8 @@ export default {
|
|||
catch(err) {
|
||||
/* NoOp */
|
||||
}
|
||||
|
||||
this.$emit('input', event);
|
||||
},
|
||||
onFocus() {
|
||||
if (this.showOnFocus && this.isEnabled()) {
|
||||
|
|
|
@ -457,6 +457,11 @@ export default {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>input</td>
|
||||
<td>event</td>
|
||||
<td>Callback to invoke when input field is being typed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>date-select</td>
|
||||
<td>value: Selected value</td>
|
||||
|
|
Loading…
Reference in New Issue