Set value/text for jquery input of type time

This forum contains topics that were moved from Get Satisfaction
Chris N
Posts: 0
Joined: Thu Mar 19, 2015 5:18 pm

Set value/text for jquery input of type time

Post by Chris N »

I have an input component which is set as type time. The text is defaulted to empty, and the placeholder is "00:00:00 AM/PM". I want to set this value to the current time. I've tried using what I believe is the appery code method, as well as jquery directly, but the values don't seem to update on the screen. Examples:

jQuery:
code$("screenName_inp_time_sent").val( "18:01:07" );/code

Appery:
codeApperyio('inp_time_sent').text("18:01:07");/code

After making the text change I've also tried running Apperyio.refreshScreenFormElements(), but it still doesn't update the user interface with the updated value. Should I be using some other method to update the input time control?

Pavel Zarudniy
Posts: 0
Joined: Mon Jul 06, 2015 8:56 am

Set value/text for jquery input of type time

Post by Pavel Zarudniy »

Chris N
Posts: 0
Joined: Thu Mar 19, 2015 5:18 pm

Set value/text for jquery input of type time

Post by Chris N »

So to clarify from your link, I should be using:
codeApperyio('inp_time_sent').text("18:01:07");/code

What would be the appropriate code if I was to use jQuery instead?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Set value/text for jquery input of type time

Post by Yurii Orishchuk »

Hi Chris,

You can use following JS code to get current value from input component:

pre

var value = Apperyio("mobiletextinput_93").val();
console.log("value = " + value);

/pre

And here is is code to set value:

pre

Apperyio("mobiletextinput_93").val("04:06")

/pre

Regards.

Post Reply