Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE 7 fix #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion bday-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
}

// Update the option sets according to options and user selections
$fieldset.change(function() {
$fieldset.change(function() {
// todays date values
var todayDate = new Date(),
todayYear = todayDate.getFullYear(),
Expand All @@ -136,6 +136,20 @@
// max values currently in the markup
curMaxMonth = parseInt($month.children(":last").val()),
curMaxDay = parseInt($day.children(":last").val());

//IE - 7 patch- Anandaraj
if (settings["dateFormat"] == "bigEndian") {
$day.remove();
$month.remove();
$year.after($month);
$month.after($day);
} else if (settings["dateFormat"] == "littleEndian") {
$day.remove();
$day.insertBefore($month);
} else {
$day.remove();
$month.after($day);
}

// Dealing with the number of days in a month
// http://bugs.jquery.com/ticket/3041
Expand Down