How to hide all year in datepicker except a year before today in ext.net

125 Views Asked by At

I have a problem with datepicker (datefield component) using ext.net, so in the datepicker that i use is only show month and year, however i can't eliminate (hide mode, not disable) another year which I don't want displayed in the selection.

The datepicker :

enter image description here

As you can see in that image above, i only use month and year but i can't figured out how to hide or remove the other year (only year) except this year and a year before now.

So the expected result shoud be in the year picker only show 2018 and 2019 because this year is 2019 and a year before now is 2018.

The code that i implement in in .aspx :

<ext:DateField runat="server" ID="datePicker1" Type="Month" Format="Y" AnchorHorizontal="50%" ></ext:DateField>

Please help.

0

There are 0 best solutions below