I have a Time range field I am trying to implement into my Wordpress page. Where do I need to put this code and how do I call it when I want the range text box displayed on my page?
$('.timeRange').timeEntry({beforeShow: customRange});
function customRange(input) {
return {minTime: (input.id === 'timeTo' ?
$('#timeFrom').timeEntry('getTime') : null),
maxTime: (input.id === 'timeFrom' ?
$('#timeTo').timeEntry('getTime') : null)};
}
I have this for just a simple Time Entry field.
<script>
$.timeEntry.setDefaults({spinnerImage: 'http://sdtest.net/wp-content/uploads/2017/06/spinnerDefault.png'});
</script>
<script>
$(function () {
$('#timeEntry').timeEntry({defaultTime: +20});
});
</script>
and I call it with this html
<input type="text" id="timeEntry">
Just need help getting the ranged textbox script put in the right place and the correct code to call it.
Any help would be greatly appreciated.
Thanks, Matt