Skip to content

Instantly share code, notes, and snippets.

@lazypower
Created March 20, 2011 11:43
Show Gist options
  • Save lazypower/878288 to your computer and use it in GitHub Desktop.
Save lazypower/878288 to your computer and use it in GitHub Desktop.
jQuery(document).ready(function(){
//prevent the DatePicker default event handler from causing a full page refresh
jQuery('#schedule').click(function(e){
e.preventDefault();
});
jQuery('#schedule').datepicker({
onSelect: function(dateText, inst) { // receiver params - selected date, instance of datepicker
var name = jQuery( "#name" ),
email = jQuery( "#email" ),
password = jQuery( "#password ");
jQuery("#dialog-form").attr('title','Schedule your appointment on ' + dateText);
jQuery("#dialog-form").dialog("open");
} // end of onSelect method
}); // end of .datePicker selector
jQuery("#dialog-form").dialog({
autoOpen: false,
modal: true,
height: 300,
width: 350,
buttons: {
"Create an account": function() {
//allFields.removeClass("ui-state-error"); -- this needs mapped to something useful
// insert data scrubbing code here
}, // end of Create Button
Cancel: function() {
jQuery( this ).dialog( "close" );
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment