Im beginner for the emebr-js im create the application for my university project, im add some 3rd party calendar for my application, i want to add some java script in this application where's to include this 3rd part script, im try to add this route > Profile.js but not working, how can i add this script for the profile.hbs
hbs page name Profile.hbs
this is my script
<script type="text/javascript">
var calendarPicker2 = $("#dsel2").calendarPicker({
monthNames:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
useWheel:true,
//callbackDelay:500,
years:0,
months:0,
days:3,
showDayArrows:false,
callback:function(cal) {
}});
</script>
calendarPickeris defined ?. Create componentmy-profileand include it in profile.hbs template like{{my-profile }}and include datePicker initialization code indidInsertElelementlife cycle hook method.ember g component my-profileit will create .hbs and .js file for you<div id="bookingdetails-calender"> <a href="calendarPicker.html#" onclick="calendarPicker2.changeDate(new Date())"></a> <div id="dsel2" style="width:390px;margin-left:-100px;"></div> </div>