How do I textbox date/time type

Get help using Construct 2

Post » Sun Sep 25, 2016 9:33 am

The Construct2 has textbox type: Number, password, email, url, telephone number. When I export to android works perfect (only numbers in the input for example). I need to make a textbox type date/datetime that runs native to android. Does anyone know how to do?
B
4
Posts: 8
Reputation: 221

Post » Sun Sep 25, 2016 10:33 am

I'm not sure if it's possible to change in the editor. I guess you could hack it in with jQuery, though I found it easier to edit the plugin itself. Note that the 'datetime' type didn't work for some reason (not sure if it's lack of support or what), but the 'date' type did, so I added that.

You can download it here --
https://mega.nz/#!698DXZaJ!XkB-ZUXCLVqQu0v3D9zbdgbLmthRN5CgfsOAMXklvsU

Put it in Construct 2\exporters\html5\plugins
Add the updated 'Textbox 2' object to your layout, and change the Type in the properties window to 'date'. I tested it on chrome and android and it seems to work on both.

EDIT: according to this, DateTime only works in Safari --
http://www.w3schools.com/jsref/dom_obj_datetime.asp

So i updated the extension to also include the 'time' type - so you can just use 2 separate text boxes (new link above).
B
9
S
1
Posts: 12
Reputation: 448

Post » Sun Sep 25, 2016 12:34 pm

Thanks for your help!! worked perfectly!!!
B
4
Posts: 8
Reputation: 221


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], David181, evillair and 61 guests