Created
July 4, 2014 13:47
-
-
Save capocasa/542afaecaf67c2722963 to your computer and use it in GitHub Desktop.
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
--- a/plugins/sfFormExtraPlugin/lib/widget/sfWidgetFormJQueryDate.class.php | |
+++ b/plugins/sfFormExtraPlugin/lib/widget/sfWidgetFormJQueryDate.class.php | |
@@ -90,8 +90,8 @@ class sfWidgetFormJQueryDate extends sfWidgetForm | |
function wfd_%s_check_linked_days() | |
{ | |
- var daysInMonth = 32 - new Date(jQuery("#%s").val(), jQuery("#%s").val() - 1, 32).getDate(); | |
- jQuery("#%s option").attr("disabled", ""); | |
+ var daysInMonth = new Date(jQuery("#%s").val(), jQuery("#%s").val(), 0).getDate(); | |
+ jQuery("#%s option").attr("disabled", null); | |
jQuery("#%s option:gt(" + (%s) +")").attr("disabled", "disabled"); | |
if (jQuery("#%s").val() > daysInMonth) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment