Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react datepicker format component

// import the datepickercomponent
import { DatePickerComponent } from '@syncfusion/ej2-react-calendars';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
export default class App extends React.Component {
    constructor() {
        super(...arguments);
        this.dateValue = new Date();
    }
    render() {
        return <DatePickerComponent id="datepicker" value={this.dateValue} format='yyyy-MM-dd' placeholder='Enter date'/>;
    }
}
;
ReactDOM.render(<App />, document.getElementById('element'));
Source by ej2.syncfusion.com #
 
PREVIOUS NEXT
Tagged: #react #datepicker #format #component
ADD COMMENT
Topic
Name
9+6 =