Mintoris Forum

Author Topic: HTML Form date input  (Read 2347 times)


  • Full Member
  • ***
  • Posts: 34
HTML Form date input
« on: Dec 18, 2017, 10:23 PM »
Not to post again so soon but while I'm reworking my program I've notice the date input in not pulling up the native date picker in android.  The date picker is all dark theme with the text and selected date not showing.  I am using  <p>Date Purchased: <input type='date' name='dpurchased'/></p>.  My phone is a Samsung so it could be a phone issue as well.  This is a sample of what I'm doing.
It loads correctly in the phones HTML viewer.
I've added screen captures the first is from Mintoris, the second is from my phones html viewer.

Orientation 1
ct = Time()
ct$ =  FormatTime$(ct,"yyyy-MM-dd")
form$ = "<html>"
form$ = form$ + "<head >"
' form$ = form$ + "<meta http-equiv=\"content-type\" content=\"text/html;charset=UTF-8\"/>"
' form$ = form$ + "<link rel=\"stylesheet\" type=\"text/css\" href=\"html/contacts.css\"/>"
form$ = form$ + "<title >Edit Shares</title>"
form$ = form$ + "<style> body{background-color:black;}"
form$ = form$ + "h2 {color:white;}"
form$ = form$ + "p{color:white;}"
form$ = form$ + "</style>"
form$ = form$ + "</head>"
' form$ = form$ + "<body bgcolor=\"White\">"
form$ = form$ + "<div align=\"center\">"
form$ = form$ +  "<h2>Edit Shares</h2><hr>"
form$ = form$ + "<form id='enter' method='GET' action='ENTER'>"
form$ = form$ + "<p>Symbol: <input type='text' name='symbol'/></p>"
form$ = form$ + "<p>Shares: <input type='number' name='shares' value='0' style='margin-left:5px'/></p>"
form$ = form$ + "<p>Cost:   <input type='number' name='cost' value='0' style='margin-left:22px'/></p>"
form$ = form$ + "<p>Date Purchased: <input type='date' name='dpurchased'/></p>"
form$ = form$ + "<p>Select Date to Use:<br /><input type='radio' name='source' value='yahoo' checked /> Yahoo's Date "
form$ = form$ + "<input type='radio' name='source' value='mandate' > User's Date </p>"
form$ = form$ + "<hr><br>"
form$ = form$ +   "<input type='submit' name='submit' value='Save'style='margin-right:30px'/>"
form$ = form$ +   "<button type='button' name='cancel' value='true'>Cancel</button>"
form$ = form$ + "</form>"
form$ = form$ + "</div>"
form$ = form$ + "</body>"
form$ = form$ + "</html>"
HtmlBrowser On
HtmlLoadData form$

print form$

« Last Edit: Dec 21, 2017, 01:10 PM by wills »


  • Full Member
  • ***
  • Posts: 34
Re: HTML Form date input
« Reply #1 on: Jan 31, 2018, 12:48 AM »
Till I get a html datepicker working I have written this date picker in Mintoris.  It is just a loop for demonstration but can easily be modified to handle larger date ranges.  It does check for leap year to avoid Feb 29, 2016.


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: HTML Form date input
« Reply #2 on: Jan 31, 2018, 07:21 AM »
Oh, I think if you write form$ to a html/tmpfile.html and then use the HtmlLoadFile command instead of HtmlLoadData, it will work. That is how the Contact Database demo program is written.

Don't forget to uncomment this statement.

' form$ = form$ + "<link rel=\"stylesheet\" type=\"text/css\" href=\"html/contacts.css\"/>"

If you use a css file then you have to use HtmlLoadFile for it to find the css file. I think that the folder path HtmlLoadData is the system default and not the Data folder.

The difference may be that the html browser app has a better default css than the html viewer window provided to developers. If you don't explicitly specify your own css, then you are at the whim of the browser you are using. No two browsers may show the same colors.
« Last Edit: Jan 31, 2018, 07:32 AM by Chuck »


  • Full Member
  • ***
  • Posts: 34
Re: HTML Form date input
« Reply #3 on: Jan 31, 2018, 01:07 PM »
Chuck l have gone so far as to make a separate html file and load it.  The html displays but not in the light theme to where all fields and selections can be seen.  I believe it may be the phone.  I'm using an S8+ now and when I wrote the program I was using an S5 and it displayed correctly then.  I rewrote my edit shares input screen in the graphics mode and with my new date picker and input commands and it  works fine.  That's what I like about Mintoris there is always more than one way to do things.  I should make them subs to save space.  Thanks for the help.


  • Full Member
  • ***
  • Posts: 18
HTML Form date input
« Reply #4 on: Oct 16, 2019, 12:01 AM »
And it works great if you do not have to drop that session. If you read 2 or 50 new messages and have to break off that session, then you lost 48 message if you call right back.


  • Newbie
  • *
  • Posts: 1
HTML Form date input
« Reply #5 on: Nov 22, 2019, 10:13 AM »
Received that message twice when I tried to reply to a thread this morning.  Third time worked and no further occurences.  Maybe its because of all the SNOW