How to let my Date-Input look more native?


#1

have a Angular/Ionic App and wanted to add a Date:

<input type="text" placeholder="value" ng-model="data.reading"><input type="date" ng-model="data.date">

On the iPhone it looks like:

Is there a way to let it look more native? Its just looks very very ugly


#2

Define “More Native”. Any examples of what you would want it to look like?


#3

E.g. The text should be in the vertical center.


#4

Like this! :wink:


#5

No. I just want that the text will be in the vertical center and not at the top of the form element.


#6

Then give this input some padding-top?


#7

I think this sould be the job of the UI framework. Not for the user which make a different padding-top for every platform.


#8

You could submit a pull request on github. Im gonna link someone of the guys at drifty
@mhartington


#9

I’ve used this in the past. Solid, easy and native. You’ll need to code the callback, so its a bit more complex, but not too bad.


#10

So that original example you should seems like something before ios7, which we’re not supporting. Apple requires all apps to be built for ios7 and up.

But for iOS7 and up, you should be able to just get a native date picker as a keyboard.


#11

And use ngCordova to access it! :slight_smile: