Contact Form 7 Datepicker - Version 2.2.1

Version Description

  • Added fix for watermark on field update
Download this release

Release Info

Developer shockware
Plugin Icon wp plugin Contact Form 7 Datepicker
Version 2.2.1
Comparing to
See all releases

Code changes from version 2.2 to 2.2.1

Files changed (3) hide show
  1. contact-form-7-datepicker.php +1 -1
  2. datepicker.php +8 -4
  3. readme.txt +4 -1
contact-form-7-datepicker.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form 7 Datepicker
4
Plugin URI: https://github.com/relu/contact-form-7-datepicker/
5
Description: Easily add a date field using jQuery UI's datepicker to your CF7 forms. This plugin depends on Contact Form 7.
6
Author: Aurel Canciu
7
- Version: 2.2
8
Author URI: https://github.com/relu/
9
*/
10
4
Plugin URI: https://github.com/relu/contact-form-7-datepicker/
5
Description: Easily add a date field using jQuery UI's datepicker to your CF7 forms. This plugin depends on Contact Form 7.
6
Author: Aurel Canciu
7
+ Version: 2.2.1
8
Author URI: https://github.com/relu/
9
*/
10
datepicker.php CHANGED
@@ -89,6 +89,7 @@ class CF7_DatePicker {
89
$this->input_name = $name;
90
91
$this->options['firstDay'] = get_option('start_of_week');
92
$this->options = wp_parse_args((array)$options, $this->options);
93
$this->options = apply_filters('cf7_datepicker_options', $this->options);
94
}
@@ -110,8 +111,11 @@ class CF7_DatePicker {
110
public function generate_code($inline = false) {
111
$selector = ($inline) ? "$('$this->input_name')" : "$('input[name=\"{$this->input_name}\"]')";
112
113
- $out = self::_regionalize($selector);
114
- $out .= "{$selector}.datepicker({$this->options_encode()});\n";
115
116
$out = "jQuery(function($){ $out });";
117
@@ -127,13 +131,13 @@ class CF7_DatePicker {
127
return stripslashes($options);
128
}
129
130
- private static function _regionalize($selector) {
131
$regional = self::get_regional_match();
132
133
$regional = apply_filters('cf7dp_datepicker_regional', $regional);
134
135
if ($regional)
136
- return "{$selector}.datepicker('option', $.datepicker.regional['{$regional}']);";
137
138
return '';
139
}
89
$this->input_name = $name;
90
91
$this->options['firstDay'] = get_option('start_of_week');
92
+
93
$this->options = wp_parse_args((array)$options, $this->options);
94
$this->options = apply_filters('cf7_datepicker_options', $this->options);
95
}
111
public function generate_code($inline = false) {
112
$selector = ($inline) ? "$('$this->input_name')" : "$('input[name=\"{$this->input_name}\"]')";
113
114
+ $out = "{$selector}.datepicker({$this->options_encode()})";
115
+ $out .= self::_regionalize();
116
+
117
+ // Remove watermark class onSelect
118
+ $out .= ".datepicker('option', 'onSelect', function(){ $(this).removeClass('watermark'); });\n";
119
120
$out = "jQuery(function($){ $out });";
121
131
return stripslashes($options);
132
}
133
134
+ private static function _regionalize() {
135
$regional = self::get_regional_match();
136
137
$regional = apply_filters('cf7dp_datepicker_regional', $regional);
138
139
if ($regional)
140
+ return ".datepicker('option', $.datepicker.regional['{$regional}'])";
141
142
return '';
143
}
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: shockware
3
Tags: wordpress, datepicker, calendar, contact form 7, forms, jqueryui
4
Requires at least: 2.9
5
Tested up to: 3.5
6
- Stable tag: 2.2
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -34,6 +34,9 @@ You can [open an issue on github](https://github.com/relu/contact-form-7-datepic
34
35
== Changelog ==
36
37
= 2.2 =
38
* Added basic date validation
39
* Fixed watermark
3
Tags: wordpress, datepicker, calendar, contact form 7, forms, jqueryui
4
Requires at least: 2.9
5
Tested up to: 3.5
6
+ Stable tag: 2.2.1
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
34
35
== Changelog ==
36
37
+ = 2.2.1 =
38
+ * Added fix for watermark on field update
39
+
40
= 2.2 =
41
* Added basic date validation
42
* Fixed watermark