From 64cfc58a0759f0b5f898c2ebf0d05d5a448e21bd Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 23 Nov 2016 16:01:32 -0500 Subject: [PATCH] Update js file for datepickers Need to have dateFormat for the datepickers. --- functions.php | 2 +- js/app.js | 15 +++++++++------ js/custom/pageSetup.js | 15 +++++++++------ style.css | 2 +- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/functions.php b/functions.php index 3ec939d..fb22169 100644 --- a/functions.php +++ b/functions.php @@ -62,7 +62,7 @@ function glm_site_scripts() 'glm_foundation', get_template_directory_uri() . '/js/app.js', 'jquery', - '1.0.17', + '1.0.18', true ); wp_enqueue_script('jquery-ui-datepicker'); diff --git a/js/app.js b/js/app.js index 26a3b5f..d097eae 100644 --- a/js/app.js +++ b/js/app.js @@ -23,17 +23,20 @@ $(document).ready(function () { $( "#input_3_3" ).datepicker({ showOn: "both", buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif", - buttonImageOnly: true + buttonImageOnly: true, + dateFormat: "mm/dd/yy" }); $( "#input_4_6" ).datepicker({ showOn: "both", buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif", - buttonImageOnly: true + buttonImageOnly: true, + dateFormat: "mm/dd/yy" }); $( "#input_5_20" ).datepicker({ showOn: "both", buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif", - buttonImageOnly: true + buttonImageOnly: true, + dateFormat: "mm/dd/yy" }); // caching menu elements @@ -130,10 +133,10 @@ $(document).ready(function () { $('#cam6').attr('src','http://www.otsegocountymi.gov/images/OtsegoCoAnimalCam.jpg?b=' + Math.random()); $('#cam7').attr('src','http://www.weather.gov/images/apx/webcam/webcam.jpg?b=' + Math.random()); }, 10000); - + var newsTicker = $('.mtphr-dnt-tick.mtphr-dnt-default-tick.mtphr-dnt-clearfix').children('a').css("color", "White").css("text-decoration","underline"); - - + + /* get number of elements in DOM console.log($("*").length); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index b79969b..29488d1 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -14,17 +14,20 @@ $(document).ready(function () { $( "#input_3_3" ).datepicker({ showOn: "both", buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif", - buttonImageOnly: true + buttonImageOnly: true, + dateFormat: "mm/dd/yy" }); $( "#input_4_6" ).datepicker({ showOn: "both", buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif", - buttonImageOnly: true + buttonImageOnly: true, + dateFormat: "mm/dd/yy" }); $( "#input_5_20" ).datepicker({ showOn: "both", buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif", - buttonImageOnly: true + buttonImageOnly: true, + dateFormat: "mm/dd/yy" }); // caching menu elements @@ -121,10 +124,10 @@ $(document).ready(function () { $('#cam6').attr('src','http://www.otsegocountymi.gov/images/OtsegoCoAnimalCam.jpg?b=' + Math.random()); $('#cam7').attr('src','http://www.weather.gov/images/apx/webcam/webcam.jpg?b=' + Math.random()); }, 10000); - + var newsTicker = $('.mtphr-dnt-tick.mtphr-dnt-default-tick.mtphr-dnt-clearfix').children('a').css("color", "White").css("text-decoration","underline"); - - + + /* get number of elements in DOM console.log($("*").length); diff --git a/style.css b/style.css index e9e03db..5fbfb3b 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: OtsegoCounty Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for OtsegoCounty -Version: 1.0.29 +Version: 1.0.30 */ -- 2.17.1