OpenSprinkler Forums OpenSprinkler Mobile and Web App Mobile Web App with Screenshots (Updated) Re: Re: Mobile Web App for OpenSprinkler (w/Screenshots)



@dman wrote:

Bugs in program preview on Win7 & Chrome
On the program previous screen I get this:[attachment=2:39r2b07v]os4.PNG[/attachment:39r2b07v]

This is not a bug perse, but a feature of Chrome. Each browser gets to handle how to display an input with type date. Chrome and other desktop browsers give you what you captured above. The very right arrow drops down a monthly calendar allowing valid date selection that way.

@dman wrote:

Anyway the up/down button advance/decrement the displayed date. If I advance to 31 Juy (not a date!) I get a screen with Nan for columns:[attachment=1:39r2b07v]preview1.PNG[/attachment:39r2b07v]

The up/down arrow actually increase the values without any error checking. This is okay, normally, because javascript handles overflow on dates correctly. The problem is the way I parse the date afterwards. My app sees 6-31-2013 however javascript sees 7-1-2013.

@dman wrote:

I also get this if I press the blue X next to up/down button – but it then displays:[attachment=0:39r2b07v]preview2.PNG[/attachment:39r2b07v]
Pressing the up/down button still advances the dd part, but leaves the other parts of the format string eg: 02/mm/yyyy

I have now fixed this problem and pushed the update! The preview will not attempt to get data unless a full date is given. I still need to check if that date is valid but it at least wont give NaN for 02/m/yyyy anymore.

@dman wrote:

On Firefox (PC) there is no way to change date apart from actual edit the date on the screen and refresh.

As I said above each browser is different and unfortunately trying to support all of them would be a nightmare. I, personally, am targeting mobile devices with this application and willing to overlook FF, IE, Chrome’s slightly different date input methods.

Update: I just tested Firefox and your right there is no help whatsoever in date input. That really sucks! I could add my own but I really don’t want to load a lot of extra javascript that will only benefit one browser, plus I hate FF.

Update 2: Here is some information on what browser’s support date and other special inputs:

Update 3: My previous fix for the NaN issues also works for invalid dates so long the browser supports date input’s. This is because the browser will do validation and set the value to empty on invalid dates. So outside of a few odd scenarios I think I am done worrying about this issue, for now.