Skip to content

Feature Request : DateTime Component - Option to set current time as default value for picker  #7973

@manuelroth

Description

@manuelroth

Short description of the problem:

The DateTime Component allows to create a simple input component for date and time inputs. It would be nice, if there was an option to set the current time as default value for the picker.

In many cases it would be useful, if the default value of the picker was not 1. January 2016 but the current date of the day. With this people could fill out the form even faster, same applies to time inputs.

What behavior are you expecting?

Add some sort of attribute to the datetime component which allows to set the default value of the picker to the current time.

<ion-item>
  <ion-label>Date</ion-label>
  <ion-datetime displayFormat="MM/DD/YYYY" [(ngModel)]="myDate" useCurrentTimeAsDefaultValue="true"></ion-datetime>
</ion-item>

Which Ionic Version?
ionic 2.00-beta 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions