0

Creating a website for manipulating TAX related data. So we need to show financial years on most of the pages. One of my collages done this as a workaround. Is there any property for Kendo datepicker to achieve this?

  $(document).ready(function() {
    // create ComboBox from input HTML element
    var date = new Date('@DateTime.Today'.replace(/-/g, "/"));
    date.setFullYear(date.getFullYear());
    date.setMonth(date.getMonth());
    $("#monthpicker").kendoDatePicker({
      start: "decade",
      depth: "decade",
      change: onChange

    });

    function onChange() {

      var s = $("#monthpicker").data("kendoDatePicker").value().getFullYear();
      $("#monthpicker1").val(s + "-" + (s + 1));
    }
  });
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2015.3.930/styles/kendo.common-material.min.css" />
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2015.3.930/styles/kendo.material.min.css" />


<input id='monthpicker1' style='width:120px;border:1px solid #10c4b2;background-color:#fff;height:1.65em;padding:.177em;' readonly="true" />
<input id='monthpicker' style="width:0px" />

<script src="//kendo.cdn.telerik.com/2015.3.930/js/jquery.min.js"></script>
<script src="//kendo.cdn.telerik.com/2015.3.930/js/kendo.all.min.js"></script>

@OnaBai- The Kendo UI legend, am looking for your help.

1 Answers1

1

You can use a similar approach as here: http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/datepicker/how-to/masked-date-picker-grid

You can extend your datepicker add needed functionality and then use it as:

$('#financiarDatePicker').kendoFinanciarDatePicker();
calinaadi
  • 1,466
  • 1
  • 13
  • 22