Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3550
WebdatePicker value
posted

On the client side, from a drop down, on valuecahnged event, I need the year value of WebDatePicker.

I use


 var txtDate = $find("txtExpiryDate");


    var date = txtDate.get_value(); 
    GetHolidays(date.year);

but I get    Thu Feb 28 00:00:00 UTC+0200 2013, which I dont know how to get the year value.


Parents
  • 17590
    Offline posted

    Hello drpoalim,

    Thank you for posting in the community!

    Data type returned by get_value() function is date type object. In order to get current year value of the date type object what I can suggest is using getFullYear() function. In your scenario it should look like as following:

    var txtDate = $find("txtExpiryDate");

    var date = txtDate.get_value();

    GetHolidays(date.getFullYear());

    Do not hesitate to contact me if you have any further questions concerning this matter.

     

     

Reply Children