mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 09:22:34 +00:00
Fixed #2152 - New input event for Calendar
This commit is contained in:
parent
7441f842af
commit
5cbd68d720
4 changed files with 23 additions and 0 deletions
|
@ -249,6 +249,17 @@ const CalendarProps = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const CalendarEvents = [
|
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",
|
name: "date-select",
|
||||||
description: "Callback to invoke when a date is selected.",
|
description: "Callback to invoke when a date is selected.",
|
||||||
|
|
5
src/components/calendar/Calendar.d.ts
vendored
5
src/components/calendar/Calendar.d.ts
vendored
|
@ -276,6 +276,11 @@ export declare type CalendarEmits = {
|
||||||
* @param {CalendarValueType} value - New value.
|
* @param {CalendarValueType} value - New value.
|
||||||
*/
|
*/
|
||||||
'update:modelValue': (value: CalendarValueType) => void;
|
'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.
|
* Callback to invoke when a date is selected.
|
||||||
* @param {Date} value - Selected value.
|
* @param {Date} value - Selected value.
|
||||||
|
|
|
@ -2171,6 +2171,8 @@ export default {
|
||||||
catch(err) {
|
catch(err) {
|
||||||
/* NoOp */
|
/* NoOp */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.$emit('input', event);
|
||||||
},
|
},
|
||||||
onFocus() {
|
onFocus() {
|
||||||
if (this.showOnFocus && this.isEnabled()) {
|
if (this.showOnFocus && this.isEnabled()) {
|
||||||
|
|
|
@ -457,6 +457,11 @@ export default {
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>input</td>
|
||||||
|
<td>event</td>
|
||||||
|
<td>Callback to invoke when input field is being typed.</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>date-select</td>
|
<td>date-select</td>
|
||||||
<td>value: Selected value</td>
|
<td>value: Selected value</td>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue