[Solved] [Known Issue] Date questions on Mobile are converting the date to 2015-04-27 when they’re inputted as 04/27/2015

0

To work around this for reporting purposes, you can follow the steps below.

The following steps will allow you to store your dates in a separate textbox, all properly formatted as mm/dd/yyyy.

  1. Create a textbox question on any page after the date question. Call it whatever you’d like.
  2. On the “layout” tab of the new textbox question, scroll to the CSS Hook section at the bottom. Add the hook “date”, like this: http://i.imgur.com/19JiC0R.png
  3. On the “logic” tab of the new textbox question, mark it as hidden by default, like this: http://i.imgur.com/4hj2eZt.png
  4. Save your question. Add a Javascript action to the same page. Paste in the code below. In the Logic tab of the Javascript action, set it to only run if mobile=true, like this: http://i.imgur.com/CO4uhFy.png
  5. Save your action, and you should be good to go!

//Caitlin – workaround script 09/21/15
//converts all dates to mm/dd/yyyy (incl dates entered on mobile)

$(document).ready(function(){

var date = $(“.date input:text”).val();
date = date.split(“-“);

date = (date[1]+”/”+date[2]+”/”+date[0]);

$(“.date input:text”).val(date);

});

 

 

If you have any issues getting this set up, just let us know.

Thanks!

–Caitlin

Caitlin - SurveyGizmo asked

    Best answer

    0

    This should be all fixed up! Let us know if you’re still having issues with this, and we’ll take another look :)

    Caitlin - SurveyGizmo answered
      ×

      Login

      Question stats

      • Active
      • Views268 times
      • Answers1 answer
      • Followers0 followers