0

Can we fire Jquery Date picker On select event explicitly on Page Load?

I am pre populating the date in date picker, so I want to fire an ajax call based on the pre populated date.

Thank you!

user1773209
  • 173
  • 6
  • 1
    look into trigger function in jQuery – Murali Murugesan Dec 11 '12 at 06:24
  • @MuraliMurugesan - I want to set a date in the datepicker when the user selects an option button. For year option I want to set the start date and the end date for the previous year. I can do all of this programmatically but the max date in the datepicker initializer is biting me. I want to trigger the date function as if the user actually made a selection. I tried the .click and the .trigger. The .click did nothing. The .trigger gave me this error: Cannot convert undefined or null to object. I'm still looking into it but hopeful you may have advice. Thank you. – Patricia Jan 20 '17 at 16:02
  • 1
    @Patricia, please have a look at `setDate` function offered by jquery datepicker. To set it dynamically check http://stackoverflow.com/questions/606463/jquery-datepicker-set-selected-date-on-the-fly – Murali Murugesan Jan 21 '17 at 15:04

0 Answers0