Render the calendar with week numbers in React Calendar component

1 Dec 20231 minute to read

You can enable the weekNumber in Calendar by using the weekNumber
property.

// import the calendarcomponent
import { CalendarComponent } from '@syncfusion/ej2-react-calendars';
import * as React from "react";
import * as ReactDOM from "react-dom";
export default class App extends React.Component {
    render() {
        return <CalendarComponent id="calendar" weekNumber={true}/>;
    }
}
;
ReactDOM.render(<App />, document.getElementById('element'));
// import the calendarcomponent
import { CalendarComponent} from '@syncfusion/ej2-react-calendars';
import * as React from "react";
import * as ReactDOM from "react-dom";

export default class App extends React.Component<{}, {}> {
    public render() {
        return <CalendarComponent id="calendar" weekNumber={true} />
    }
};
ReactDOM.render(<App />, document.getElementById('element'));