|
|
Display a map based on taxonomy field in custom post type
Started by: Arno
in: Toolset Professional Support
Quick solution available
|
|
2 |
8 |
4 years, 7 months ago
-
|
|
|
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 |
4 years, 7 months ago
-
|