Created
September 2, 2015 06:39
-
-
Save avtaniket/ff8a65d0b7823d452341 to your computer and use it in GitHub Desktop.
JQuery datepicker on dynamic elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
//input calender | |
$(".app_datepicker").on('focus', function(){ | |
var $this = $(this); | |
if(!$this.data('datepicker')) { | |
$this.removeClass("hasDatepicker"); | |
$this.datepicker(); | |
$this.datepicker("show"); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment