Bootstrap-Datepicker icon click event not working

user146303

I have the following template containing a calendar icon in a javascript file. It doesn't appear in my html file because it's used dynamically.

var iconTemplate = '<li id=\"{streamID}\" class=\"list\">{streamName} <i class="fa fa-calendar pull-right"></i></li>';

I want to add a click event to the calendar icon and open date picker. I tried the following:

    $('.fa-calendar').click(function(){
      $(this).datepicker();
    });

I'm guessing that this doesn't work because it's not calling on a class from the html file. Is it possible to do this all within a javascript file?

isherwood
$(document).on('click, '.fa-calendar', function(){
    ...

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to autoclose and click icon datepicker bootstrap

From Dev

Datepicker is not working on icon click for img field

From Dev

Leaflet marker icon click event is not working

From Dev

Bootstrap datepicker icon

From Dev

Jquery datepicker icon not working

From Dev

Handle on click event of jQueryUI Datepicker for Bootstrap drop-down menu

From Dev

jquery bootstrap datepicker click event just firing once

From Dev

Attach click event for the weekday labels in Angular UI Bootstrap datepicker

From Dev

Prevent event firing when double click on bootstrap icon

From Dev

Angular UI Bootstrap datepicker in modal only working on first click

From Dev

Datepicker click event getdate

From Dev

On Click Event With Symbol Icon

From Dev

bootstrap datepicker value on click

From Dev

Bootstrap datepicker in modal not working

From Dev

Bootstrap Datepicker not working in chrome

From Dev

bootstrap datepicker validation not working

From Dev

Bootstrap 3 DatePicker not working

From Dev

Bootstrap popover datepicker is not working

From Dev

defaultViewDate not working on Bootstrap datepicker

From Dev

Bootstrap 3.0.3 & DatePicker not working

From Dev

bootstrap datepicker validation not working

From Dev

Bootstrap Datepicker not working in chrome

From Dev

bootstrap popover button click event does not working using jquery

From Dev

Bootstrap tabs click event

From Dev

jquery datepicker not working on input click

From Dev

jquery datepicker not working on input click

From Dev

On click event not working as a delegated event

From Dev

Jquery on click event not working

From Dev

Click event not working on tablets

Related Related

HotTag

Archive