Skip to content

Instantly share code, notes, and snippets.

--- 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);