In the date range drop down, the user has the ability to sort 5 years in the past and 5 years in the future. I would like to limit the drop down to show on the current and future years and eliminate the past years. Could you explain how this is done?
Unfortunately that request is out of the box of our plugin and it will require some code customization.
I can give you some guide where to look so maybe you can find the solution. In file ../wpdatatables/assets/js/wpdatatables/wpdatatables.js around line 606 you will find this code
* Apply pickadate
*/
var dateFormat = tableDescription.datepickFormat.replace(/y/g, 'yy').replace(/Y/g, 'yyyy').replace(/M/g, 'mmm');
var datePickerInit = function (selector, additional_params, state) {
if( $('#wdtDatePickContainer').length == 0 ){
$('<div id="wdtDatePickContainer" class="wpDataTables"></div>').appendTo('body');
}
var input = $(selector).pickadate({
format: dateFormat,
formatSubmit: dateFormat,
selectYears: 5,
selectMonths: true,
container: '#wdtDatePickContainer',
onClose: additional_params,
firstDay: 1
});
var picker = input.pickadate('picker');
if (state == 'opened') {
picker.open();
}
}
the "selectYears : 5" gives the select box 5 years in past and 5 years in the future. So I hope this can help. If you can not find the solution we can offer you our paid customization service.
In the date range drop down, the user has the ability to sort 5 years in the past and 5 years in the future. I would like to limit the drop down to show on the current and future years and eliminate the past years. Could you explain how this is done?
Hi kbosworth,
Thank you for your purchase.
Unfortunately that request is out of the box of our plugin and it will require some code customization.
I can give you some guide where to look so maybe you can find the solution.
In file ../wpdatatables/assets/js/wpdatatables/wpdatatables.js around line 606 you will find this code
the "selectYears : 5" gives the select box 5 years in past and 5 years in the future.
So I hope this can help.
If you can not find the solution we can offer you our paid customization service.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables