diff --git a/components/date.inc b/components/date.inc
index 0026783..e74157c 100644
--- a/components/date.inc
+++ b/components/date.inc
@@ -20,6 +20,8 @@ function _webform_defaults_date() {
       'timezone' => 'user',
       'year_start' => '-2',
       'year_end' => '+2',
+  		'min_date' => '',
+  		'max_date' => '',
       'year_textfield' => 0,
       'datepicker' => 1,
       'title_display' => 0,
@@ -109,6 +111,24 @@ function _webform_edit_date($component) {
     '#weight' => 4,
     '#parents' => array('extra', 'year_end'),
   );
+  
+  $form['validation']['min_date'] = array(
+	  '#type' => 'textfield',
+	  '#title' => t('Minimum date'),
+	  '#default_value' => $component['extra']['min_date'],
+	  '#description' => t('Minimum date, will accept any value parseable by strtotime()'),
+	  '#weight' => 5,
+	  '#parents' => array('extra', 'min_date'),
+	);
+	
+	$form['validation']['max_date'] = array(
+	  '#type' => 'textfield',
+	  '#title' => t('Maximum date'),
+	  '#default_value' => $component['extra']['max_date'],
+	  '#description' => t('Maximum date, will accept any value parseable by strtotime()'),
+	  '#weight' => 6,
+	  '#parents' => array('extra', 'max_date'),
+	);
 
   return $form;
 }
@@ -126,6 +146,8 @@ function _webform_render_date($component, $value = NULL, $filter = TRUE) {
     '#required' => $component['mandatory'],
     '#year_start' => $component['extra']['year_start'],
     '#year_end' => $component['extra']['year_end'],
+  	'#min_date' => $component['extra']['min_date'],
+  	'#max_date' => $component['extra']['max_date'],
     '#year_textfield' => $component['extra']['year_textfield'],
     '#default_value' => $filter ? _webform_filter_values($component['value'], NULL, NULL, NULL, FALSE) : $component['value'],
     '#timezone' => $component['extra']['timezone'],
@@ -252,7 +274,14 @@ function theme_webform_date($element) {
       $calendar_class[] = 'webform-calendar-end-' . $element['#year_end'];
     }
     $calendar_class[] ='webform-calendar-day-' . variable_get('date_first_day', 0);
-
+    
+    if (!empty($element['#min_date']) && webform_strtodate('Y-m-d', $element['#min_date'])) {
+  		$calendar_class[] = 'webform-calendar-min-' . webform_strtodate('Y-m-d', $element['#min_date']);
+		}
+  	if (!empty($element['#max_date']) && webform_strtodate('Y-m-d', $element['#max_date'])) {
+  		$calendar_class[] = 'webform-calendar-max-' . webform_strtodate('Y-m-d', $element['#max_date']);
+		}
+    
     $calendar = theme('webform_calendar', $element['#webform_component'], $calendar_class);
   }
 
@@ -294,6 +323,24 @@ function webform_validate_date($element, $form_state) {
       return;
     }
   }
+  
+	if ($element['#min_date'] !== '' && $mindate = webform_strtodate('Y-m-d', $element['#min_date'])) {
+		if (strtotime($element['year']['#value'] . '-' . 
+	    $element['month']['#value'] . '-' . 
+	    $element['day']['#value']) < strtotime($mindate)) {
+	    form_error($element, t('The entered date needs to be @minDate or later.',
+	      array('@minDate' => $mindate)));
+	  }
+	}
+	
+	if ($element['#max_date'] !== '' && $maxdate = webform_strtodate('Y-m-d', $element['#max_date'])) {
+		if (strtotime($element['year']['#value'] . '-' . 
+	    $element['month']['#value'] . '-' . 
+	    $element['day']['#value']) > strtotime($maxdate)) {
+	    form_error($element, t('The entered date needs to be @maxDate or earlier.',
+	      array('@maxDate' => $maxdate)));
+	  }
+	}
 }
 
 /**
diff --git a/js/webform.js b/js/webform.js
index 5e05ae0..65dbb4f 100644
--- a/js/webform.js
+++ b/js/webform.js
@@ -19,19 +19,25 @@ Drupal.webform.datepicker = function(context) {
     var startYear = $calendar[0].className.replace(/.*webform-calendar-start-(\d+).*/, '$1');
     var endYear = $calendar[0].className.replace(/.*webform-calendar-end-(\d+).*/, '$1');
     var firstDay = $calendar[0].className.replace(/.*webform-calendar-day-(\d).*/, '$1');
-
+    var minDate = $calendar[0].className.replace(/.*webform-calendar-min-(\d{4}-\d{2}-\d{2}).*/, '$1').split('-');
+    var maxDate = $calendar[0].className.replace(/.*webform-calendar-max-(\d{4}-\d{2}-\d{2}).*/, '$1').split('-');
+    minDate = new Date(minDate[0], minDate[1]-1, minDate[2]);
+    maxDate = new Date(maxDate[0], maxDate[1]-1, maxDate[2]);
+    
     // Ensure that start comes before end for datepicker.
     if (startYear > endYear) {
       var greaterYear = startYear;
       startYear = endYear;
       endYear = greaterYear;
     }
-
+    
     // Set up the jQuery datepicker element.
     $calendar.datepicker({
       dateFormat: 'yy-mm-dd',
       yearRange: startYear + ':' + endYear,
       firstDay: parseInt(firstDay),
+      minDate: minDate,
+      maxDate: maxDate,
       onSelect: function(dateText, inst) {
         var date = dateText.split('-');
         $webformDatepicker.find('select.year, input.year').val(+date[0]);
