IOS 7 Safari don't support date/time input

Discussion in 'iOS Development' started by aliaksej, Jul 22, 2013.

  1. aliaksej

    aliaksej Newbie

    We're developing PhoneGap application for ios and android.

    We faced the problem with date/time input. IOS 7 don't display date/time picker. By some information, apple forces developer to use date + time inputs.

    Also I don't know whether we can rely on datetime-local input??? Or it also will be removed...

    Pls share any information about date/time and datetime-local inputs.
     
  2. jvence

    jvence Newbie

    Did you figure out a solution for this? We are having the same problem with our phonegap app. Thanks
     
  3. aliaksej

    aliaksej Newbie

    We decided to refactor datetime input to date + time on all platforms to avoid all possible problems.
     
  4. damponting44

    damponting44 Banned

    I wound up utilizing the datetime-neighborhood however you need to ensure you consider the timezone when official to and from the control. We need to store GMT time in the database. I utilized the beneath capacities to change over forward and backward amid authoritative.

    work formatHTML5DateTime(date)

    {

    attempt

    {

    in the event that (typeof(date) == "vague" || date == invalid || date == '') return "";

    var tmpDate = new Date(date);

    /gets the timezone balance in minutes

    var balance = tmpDate.getTimezoneOffset();

    /apply the timezone balance backward to nearby time

    var newDate = tmpDate.addMinutes(Math.abs(offset) * - 1);

    return newDate.toISOString().replace("Z", "");

    }

    catch(e)

    {

    return "";

    }

    }

    work formatJSDate(date)

    {

    attempt

    {

    in the event that (typeof(date) == "unclear" || date == invalid || date == '') return "";

    var tmpDate = new Date(date);

    /gets the timezone balance in minutes

    var balance = tmpDate.getTimezoneOffset();

    /apply the timezone balance to UTC time

    var newDate = tmpDate.addMinutes(offset);

    return newDate.toISOString();

    }

    catch(e)

    {

    return "";

    }

    }
     

Share This Page