Having trouble getting help?
Contact Support
Contact Support
Set the placeholder in React Daterangepicker component
24 Jan 20231 minute to read
The following example demonstrates how to set placeholder
in the DateRangePicker control.
Using placeholder
you can display a short hint in the input element.
// import the daterangepicker component
import { DateRangePickerComponent } 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 <DateRangePickerComponent placeholder='Select a range'/>;
}
}
;
ReactDOM.render(<App />, document.getElementById('element'));
// import the daterangepicker component
import { DateRangePickerComponent } 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 <DateRangePickerComponent placeholder='Select a range' />
}
};
ReactDOM.render(<App />, document.getElementById('element'));