Is it possible to have knockout binding with jQuery UI Calendar?

89 views
Skip to first unread message

Mukesh Patil

unread,
Jun 25, 2017, 11:32:20 AM6/25/17
to KnockoutJS
Hello,

I am using jquery UI calendar for rendering a calendar in my web page:

With following call to datepicker show a calendar:

$('#calendar').datepicker({
inline: true,
firstDay: 1,
showOtherMonths: true,
dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
});

Is it possible to attache onclick event handler on individual dates (or days eg. number blocks from 1 to 30 on below screen) rendered on screen:


Let me know if you have any questions.

Note: I am not using default datepicker which popups by clicking on readonly datepicker field. I am directly rendering the calendar on my page.

Your help is greatly appreciated. 

Thanks in Advance,
Mukesh






noirabys

unread,
Jul 11, 2017, 7:15:36 AM7/11/17
to KnockoutJS
hi, 
write a custom binding, in the init method you may call the datepicker and register the callbacks. you should have look into the documentation of datepicker for click hooks.

best regards,
 noirabys

Andrew Freese

unread,
Jul 14, 2017, 11:40:54 AM7/14/17
to KnockoutJS
Reply all
Reply to author
Forward
0 new messages