Hi Azadur,
Sample: https://stackblitz.com/edit/react-dpzwhu?file=index.js,index.css
ug: https://ej2.syncfusion.com/react/documentation/schedule/header-bar#customizing-the-date-range-text
We prepared a sample using the
dateRangeTemplate for customizing date ranges, and it rendered as expected.
Please try the shared sample above. If you are still facing issues, please
provide the following information to help us provide a solution to your query
as soon as possible.
- Can you please confirm that
your scheduler package version is v.20.4.40 or above? We added support for the
dateRangeTemplate from v.20.4.40. Please refer to the release notes (https://ej2.syncfusion.com/react/documentation/release-notes/20.4.40/?type=all#schedule )
for more information.
- Please try reproducing the
issue in our shared sample.
- Please provide an
issue-reproducing sample or the entire code snippet related to the
schedule.
[index.js]
function getDateRange(startDate, endDate) {
return instance.formatDate(startDate, { skeleton: 'yMd' }) + ' - ' + instance.formatDate(endDate, { skeleton: 'yMd' });
}
function dateRangeTemplate(props) {
return (<div>{getDateRange(props.startDate, props.endDate)}</div>);
}
return (<ScheduleComponent width='100%' height='550px' dateRangeTemplate={dateRangeTemplate.bind(this)}>
</ScheduleComponent>);
|
Regards,
Vijay
Ravi