We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Change Date picker view format to Week or month.

Ho do i change date picker format to week view and month view like below.

Week view

Month View



Currently I am using : format: { skeleton: 'full' } this format

1 Reply

AB Ashokkumar Balasubramanian Syncfusion Team April 12, 2019 12:46 PM UTC

Hi Sonam, 
 
Thanks for contacting syncfusion support. 
 
Week View:  
 
Your provided image contains range between one date to another date. For this case, we suggested to use the DateRangePicker, because we can’t display more than one date range in DatePicker. Please find the below code block. 
 
<DateRangePickerComponent format={this.weekformat} endDate={this.endDate} startDate={this.startDate}></DateRangePickerComponent> 
 
 
To know more details about DateRangePicker component, please refer the below help document. 
 
 
Month View: 
 
Our DatePicker component, we have provided the format property for customize the date format displayed to user. You can use this property to achieve your requirement. Please find the below code block. 
 
constructor() { 
    super(...arguments); 
    this.dateValue = new Date(); 
    this.format = 'MMM yyyy'; 
} 
 
<DatePickerComponent format={this.format} value={this.dateValue}></DatePickerComponent> 
 
  
The above two requirements are showcased in below sample, please check it. 
 
 
Please let us know, if you have any concern on this. 
 
Regards, 
Ashokkumar B. 


Loader.
Up arrow icon