Published on: 12/5/13 5:29 PM
Category:Code Tags: jqueryHi there !
I have gone through some problem , this may not be very tough but I have spend more time on that so I think solution should publish
Requirement was something like as follows
for datepicker
for datepicker I have simply code as
[sourcecode language=”csharp”]
$("#date") .datepicker();
[/sourcecode]
but some conditions as
1) add months and years dropdown to the datepicker
so for that I have added some functions there
[sourcecode language=”csharp”]
changeYear:true,
changeMonth:true
[/sourcecode]
2) now the tough part comes here
by default jquery takes year as 2002 to 2012
but I need to have years from 1990 to 2012 so I have started searching
and I found that
[sourcecode language=”csharp”]
yearRange: "1990:2012"
[/sourcecode]
3) Now I have to perform some action on close of that datepicker so I need some function on close event of the datepicker
I could have 2 function 1) onClose 2) onSelect any one I could take
so have taken onClose function and could added some functionality
[sourcecode language=”csharp”]
onClose: function () {
// some code
}
[/sourcecode]
You can have demo here
Show More