KendoDatePicker date format as "21 Aug 2018"

I'm using KendoDatePicker in my application. I want the datepicker to show the date in the format "21 Aug 2018". How can this be possible with kendo ?

1 answer

  • answered 2018-05-16 06:50 Priyal Pithadiya

    @Agil, you need to add format with your kendoDatePicker declaration.

    Blow is my sample working code. Try it and let me know whether it works for you or not?

    $(document).ready(function () {
      $("#datetimepicker").kendoDatePicker({
    	  value: new Date(),
    		dateInput: true,
    		format: "dd MMMM yyyy"
    	});
    });
    html{ 
      font-size: 14px; 
      font-family: Arial, Helvetica, sans-serif; 
    }
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2018.1.221/styles/kendo.common-material.min.css" />
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2018.1.221/styles/kendo.material.min.css" />
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2018.1.221/styles/kendo.material.mobile.min.css" />
    <script src="https://kendo.cdn.telerik.com/2018.1.221/js/jquery.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2018.1.221/js/kendo.all.min.js"></script>
    <div id="example">
      <div class="demo-section k-content">
    	  <h4>Remind me on</h4>
    	  <input id="datetimepicker" title="datetimepicker" style="width: 100%;" />
      </div>
    </div>