Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jonathan_S_
New Contributor I
30 Views

How to manipulate date time using cordova with xdk?

Hello, I'm trying to show on display the current date time on an app, but doesn't works...
exist a plugin for android that I can show the current date time?

here is my code:


 

 function d()

{
 var day = new Date();
 
      var resto = day.toUTCString();

        document.getElementById('day').innerHTML = resto;

}

 

and this the HTML line:

 

<div onclick="day()" class="table-thing widget uib_w_41 d-margins" data-uib="twitter%20bootstrap/input" data-ver="1">
                        <label id="day" class="narrow-control label-inline"></label>
                        <input class="wide-control form-control default" type="text" placeholder="Placeholder">
                    </div>

 

Tags (2)
0 Kudos
2 Replies
Diego_Calp
Valued Contributor I
30 Views

Hi Jonathan,

It is not a matter of an android plugin, try using jquery to access your label, this way:

$("#day").text(resto);

Regards,

Diego

0 Kudos
Elroy_A_Intel
Employee
30 Views

You onclick should equal "d()" in stead of day()

0 Kudos