Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Open jQuery Datepicker in Facebox
<!doctype html>
<html lang="en">
<meta charset="utf-8" />
<link rel="stylesheet" href="" type="text/css" media="all" />
<link rel="stylesheet" href="css/facebox.css" type="text/css" media="all" />
<p><a href="#yourmom" rel="facebox">Open Facebox</a></p>
<div id="yourmom" style="display: none;">
<input id="datepicker" class="datepicker" />
<script src=""></script>
<script src=""></script>
<script src="js/facebox.js"></script>
$(function () {
$('#facebox .datepicker').datepicker();
$('.datepicker').live('click', function () {
$(this).datepicker('destroy').datepicker({showOn: 'focus'}).focus();
jQuery(document).bind('reveal.facebox', function() {
jQuery('#facebox .datepicker').each( function(intIndex){
jQuery(this).attr('id',jQuery(this).attr('id') + '-2')

This comment has been minimized.

Copy link

@rajeshkannanmani rajeshkannanmani commented Apr 12, 2013

is this problem fixed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment