Time and date control

Hi
would it be possible to add to the input control blocks a standard date selector (calendar with year/month/day selection) and time (hour/minute/ AM/PM 12/24H config etc.) selectors?
I suggest having 1) a comprehensive result string 2)individual properties for day/month/hr/min/sec… and c) a standard seconds from epoch property

I would also like to have a parallel display and the capability to push these properties INTO a control as described above.
Thanks
Uri

Hi Uri,

That is a great feature request, and we already have a ticket for it! :slight_smile: We will post back when the feature is released.

Thanks,
Erin

any guestimate as for availability?

Hello Erin
Any update on this? I have an IoT device which controls a timed switch. I need to program it’s time-on and time-off variables.
Thanks
Uri

1 Like

Hey Uri! This feature is still in the backlog.

However since your original request, we have released the Custom HTML Block, which does provide you a workaround.

With the Custom HTML Block, you can create any input form you want and POST the data to a Webhook or an Experience Endpoint.

To make things easier, I created a template you can import that demonstrates this using a Date Time picker.

template-input-form.zip (36.8 KB)

This template uses a Custom HTML Block built with Bootstrap and jQuery.

I Googled and picked the first jQuery Date Time picker I found, but feel free to explore others.

To make this secure, I also added Basic Auth between the dashboard and the experience endpoint. This way, only people with access to your dashboard would be able to POST data to your experience endpoint.

wow, that looks just like what I need, only, I am not sure how I send the output to my device… I am not a web programmer, but a poor C guy from home… Can you guide me please?
Thanks

Uri

@Uri_Bear,

Sure! I can help. The template Brandon sent was not the final product. But, it does give you the building blocks to solve this problem.

Open up the Custom HTML Block settings. The snippet below was pulled from the “Custom Body Content.”

$.ajax({
      type: 'POST',
      url:'https://5e9cd557b9d41000062b25d6.onlosant.com/input-form',
      data: $('#target').serialize(),
      beforeSend: appendAuth,
      error: () => { showMessage('#error') },
      success: () => { showMessage('#success') }
    });

When the form in the block is submitted, the code above will run. It makes an HTTP POST request to the URL of https://5e9cd557b9d41000062b25d6.onlosant.com/input-form, and the body of the post request will be the form data.

As you can see, that’s an onlosant URL, which means it’s an Experience Endpoint.

In the template, there is a workflow called “Workflow - POST /input-form.”

Now, here is what you need to do to get this to work for you:

  • Update the form to be the data you want to collect.
  • Update the Experience Workflow to perform the action desired once data is received. For example, use the Device Command Node to send the form data to your device.

To change the form, you’ll have to change the HTML, CSS, or JS in the block settings. However, here are some great resources to help:

Hi
Can we connect on some screenshare platform? I need a little more hands on help.

I am on Israel time, best hours are 9 to 10 PM but I will try to accommodate any time.

Thanks

Uri

@Uri_Bear,

Unfortunately, no we can’t :(. However, If you can explain where you’re struggling, I can try my best to point you to the right resources.

Overall, I recommend, checking out the links I sent above. Having some understanding of HTML, CSS, or JS is key to building within the Custom HTML Block.

OK.
I will try.

The first thing I came up with is that I do not seem to have an import button in my applications list - so cannot import the proposed template.

Second: copied the suggested code into the body section - the gui just showed the code, nothing else.
Uri

Hey Uri, the import button is on the application list found on your sandbox or organization overview page. The sandbox overview page, for example, can be found by clicking your account icon on the bottom left of the screen.

Thank you Brandon & Team, you are AWESOME!
All is working well!

Thanks

Uri

1 Like

Glad to hear that Uri!