Hi Ravi,
We suggest using the schedule navigating
and
actionBegin events. In the actionBegin event, you can check if
the clicked button is today or not, and accordingly, customize the code in
either the actionBegin or navigating event. The attached code
snippet and the following example illustrate the solution. Please give it a
try, and feel free to reach out if you require any further assistance.
Sample: https://stackblitz.com/edit/schedule-today-button-click-jpszwe?file=index.js,index.css
[index.js]
|
const onNavigating = (args) => {
if (isTodayClick) {
// You can customize the code on the click of the 'Today' button
}
}
const onActionBegin = (args) => {
if( args.event && args.event.target.innerText === 'Today' ) {
debugger;
console.log(args);
isTodayClick = true;
// You can customize the code on the click of the 'Today' button
}
}
const [eventSettings, setEventSettings] = useState({ dataSource: data, editFollowingEvents: false });
return (<div className='schedule-control-section'>
<div className='col-lg-9 control-section'>
<div className='control-wrapper'>
<ScheduleComponent width='100%' height='650px' actionBegin={onActionBegin} navigating={onNavigating} selectedDate={new Date(2021, 1, 20)} ref={scheduleObj} eventSettings={eventSettings}>
|
Regards,
Ashok