|
|
Datepicket onClose function not working
Started by: christopherH-7
in: Toolset Professional Support
Quick solution available
Problem:
I want to show Month and Year only on the date picker and on close save only month and year.
Solution:
Please add the Javascript code below in JS EDITOR section of your form:
jQuery(window).load(function($) {
jQuery('input.form-control.hasDatepicker').each(function() {
jQuery(this).datepicker( "destroy" );
jQuery(this).datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'MM yy',
onClose: function(dateText, inst) {
var month = jQuery("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = jQuery("#ui-datepicker-div .ui-datepicker-year :selected").val();
jQuery(this).datepicker('setDate', new Date(year, month, 1));
}
});
});
});
|
|
2 |
12 |
3 years, 11 months ago
christopherH-7
|
|
|
Filter view with only posts having a relationship
Started by: poM
in: Toolset Professional Support
Quick solution available
|
|
2 |
11 |
3 years, 11 months ago
poM
|
|
|
Split: Slider shows only one image
Started by: kristenM
in: Toolset Professional Support
Quick solution available
|
|
2 |
3 |
3 years, 11 months ago
kristenM
|
|
|
News slider with 3 columns to show 3 posts at a time
Started by: kristenM
in: Toolset Professional Support
Quick solution available
|
|
2 |
12 |
3 years, 11 months ago
kristenM
|
|
|
Limit number of characters in multi-line text field in form
Started by: janeC-2
in: Toolset Professional Support
Quick solution available
Problem:
How to limit the characters of a multiline input form item.
Solution:
Please add ttehJavascript code below to the form JS Editor section:
jQuery(function() {
jQuery('textarea[name="wpcf-placeholder"]').attr('maxlength', '20');
});
Make sure to replace placeholder with the slug of the multiline field.
|
|
2 |
5 |
3 years, 11 months ago
janeC-2
|