How to Allow Date Input?

Posted on
Mon May 15, 2017 5:55 pm
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

How to Allow Date Input?

I've got a scenario where I need to allow a user to enter a begin and end date upon clicking on a control page button with what I assume is some sort of Server Action . Those dates would in turn be passed to an external script for generating plots. I'm already generating a variety of plots for fixed time ranges (last hour, last 12 hours, last 24 hours... last 7 days) that are viewable in dedicated control pages, but I need to extend this to a custom date range based on the user's request.

Any ideas on how I'd go about this? Ideally, I'd be able to validate the dates through some sort of date widget in what I assume would be my own custom HTML and then possibly storing that into Indigo variables for access by a linked external script running within the Indigo Plugin Host environment, or passing them as arguments to the external script. I don't have a technical reason for running my scripts in the IPH environment other than to possibly store the dates as Indigo variables as all of the data I'm plotting is stored in a postgres database.

I'm open to any and all suggestions.

Thanks,
Blaine

Posted on
Wed May 17, 2017 5:12 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: How to Allow Date Input?

There are no custom field types/controls available on control pages because Indigo Touch doesn't render control pages in HTML. About the best you could do is allow the user to type the date(s) into variables then have a script watch for a variable change, validate that the data is correct, then generate the graphs.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri May 19, 2017 9:13 pm
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

Re: How to Allow Date Input?

Thanks Jay... this is what I suspected. I picture a Rube Goldberg Machine coming my way soon to make this happen. :wink:

I'm trying hard to isolate my clients from the machinations of Indigo, including ever exposing them to variables, devices, triggers, etc. This is a topic for another day where my wishlist for Indigo includes adding roles for differing types of users (for which I've only seen a reference to the fact that it isn't in the initial release of V7). I'm really hoping that roles make their way into Indigo someday as it takes Indigo to a new target audience beyond DIY home automation. I have several clients where Indigo is a great fit other than the fact that they can mess with the state of devices, etc., when I really don't want them to get anywhere near these "features".

--Blaine

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests