Can.js and jQuery

Hi,

I have question, how to mix properly can js and jquery plugins? For example I’d like to use input connected with can viewmodel and jquery datepicker. Where should I put

$( "#datepicker" ).datepicker();

?

you can use the “inserted” event
https://canjs.com/docs/can.Component.prototype.events.html

I usually use can.view.attr for such things. There’s a couple of examples of doing jquery kind of things in the docs. So you’d be able to create a datapicker attribute.

Thanks for suggestions. I tested both of them and works well. I also tested solution with function in *.stache and viewModel and also it was good.

<button ($click) = "showCal(@element)" >calendar</button>