Discussion Forums  >  WebViews and HTML for Mobile

Replies: 6    Views: 205

Dromundi
I hate code!
Profile
Posts: 43
Reg: Feb 17, 2012
location unknow...
730
03/22/12 08:56 AM (13 years ago)

HTML Document - Form with datepicker

Hi all, I have a menu that link to an HTML document. The goal of this HTML document would be to fill in a form and by clicking submit, it will send the information of the form. I am not a HTML expert but I am progressing. Problem I have now is that the field which is supposed to be for the date doesn't show the datepicker when you click on hit in the iOS simulator. I just have a free field which not what I expected (and wanted). I have surely missed something but I don't know what. Anyone has an idea? Here is the HTML code of this document : <html> <body> <div data-role="page" id="page1"> <div data-role="content"> <div> <b> Enter content here... </b> </div> <form action="input-type-datetime.php" method="post"> <label for="champ1">Next meeting</label> <input type="date" /> <br /><br /> <button>Tayst</button> </form> <input data-inline="true" value="Send" type="submit" /> </div> </div> <script> //App custom javascript </script> </body> </html>
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
03/22/12 09:50 AM (13 years ago)
I'm also just another 'Not an HTML Expert', but am also learning. Send your code and I'll see if there's anything I can do. Fred
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/22/12 01:32 PM (13 years ago)
Check out this link...might be a decent solution: http://stackoverflow.com/questions/388814/date-picker-for-iphone-web-application Let us know if it works! Mark
 
Dromundi
I hate code!
Profile
Posts: 43
Reg: Feb 17, 2012
location unknow...
730
like
03/23/12 05:53 AM (13 years ago)
Thanks guys for your input. I followed the link given by GoNorthWest. The answer chosen is good and I followed the link they give : http://cubiq.org/spinning-wheel-on-webkit-for-iphone-ipod-touch I finally used the files they give at the end of the article and put it in the BT_Doc folder. Unfortunately the html document did not seem to use the .jss and .css documents (which were also in BT_Doc folder). So I included the javascripts and the css in the html code and it worked in the iOS simulator!
 
CyberMobile
Apple Fan
Profile
Posts: 21
Reg: Jul 27, 2012
Haugesund
3,060
like
07/28/12 04:14 PM (13 years ago)
Hi Dromund, Can you explain how you got the date picker working. I have tried and nothing has worked so far. how do I put the .js and css into the html. thanks
 
Dromundi
I hate code!
Profile
Posts: 43
Reg: Feb 17, 2012
location unknow...
730
like
08/07/12 06:55 AM (13 years ago)
Hi CyberMobile, Sorry for the late reply I was in holidays. Did you manage in the end? To put a javascript in html you have to put before the buoy <script> and in the end </script> To put a css in html you have to put before the buoy <style type="text/css"> and in the end </end> I don't like to do that as it does not seem "clean" in a html document instead of just calling a css or a js, but it works. :) Bye
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/07/12 07:08 AM (13 years ago)
You can also add the javascript and the css to the BT_Doc folder. Fred
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.