dongpaocuan7498 2016-03-01 16:15
浏览 64

在离子日期输入处禁用时间和时区

I'm using angularjs and ionic on frontent and php (slim) at the backend. html:

<input type="date" name="birthday" ng-model="user.birthday" required>

php:

$app->post('/auth/signup', function () use ($app, $user_model, $config) {
    $data = json_decode($app->request()->getBody(), true);
    error_log($data['birthday']); //1111-11-10T20:00:00.000Z

I have a date field for getting birth date. But when it posts, I want it to just post "1111-11-11" but it posts as "Date {Sat Nov 11 1111 00:00:00 GMT+0400 (EET)}". When I get print from php it becomes "1111-11-10T22:00:00.000Z" because of the timezone difference, date changes.

I couldn't find how to fix the situation. I want the date roller, so I don't want to seperate day - month - year fields.

Thanks in advance.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 STM32驱动继电器
    • ¥15 Windows server update services
    • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
    • ¥15 模糊pid与pid仿真结果几乎一样
    • ¥15 java的GUI的运用
    • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
    • ¥15 怎么配置广告联盟瀑布流
    • ¥15 Rstudio 保存代码闪退
    • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?
    • ¥50 invest生境质量模块