Skip to content

Instantly share code, notes, and snippets.

@ElmahdiMahmoud
Last active October 13, 2015 07:28
Show Gist options
  • Select an option

  • Save ElmahdiMahmoud/4161047 to your computer and use it in GitHub Desktop.

Select an option

Save ElmahdiMahmoud/4161047 to your computer and use it in GitHub Desktop.
jqueryui: Datepciker
//Standard
$("selector").datepicker({
showOn: "button",
buttonImage: "images/calendar.gif",
buttonImageOnly: true,
prevText: "Go",
nextText: "Back",
constrainInput: false
});
//Icon
$("selector").datepicker({
showOtherMonths: true,
selectOtherMonths: true,
showOn: "both",
buttonImage: "images/calendar.png",
buttonImageOnly: true,
prevText: "",
nextText: "",
constrainInput: false
});
//onSelect
$("selector").datepicker({
showOtherMonths: true,
selectOtherMonths: true,
showOn: "both",
buttonImage: "images/calendar.png",
buttonImageOnly: true,
prevText: "",
nextText: "",
constrainInput: false,
onSelect: function(dateText, inst) {
//Do stuff
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment