Languages

Menu
Sites
Language
How to retreive a value from an input type date

Hi, 

i developped an html5 application on Tizen SDK 2.2, this application contains a form, and this form contain an input type date, i have to retreive the value of this input and diplay it in another window. I tried to retreive thi value with "var dateSalary = document.getElementById('dateSalary').value;" and tried to display it on the Console but it doesn't works, so i tried to retreive the value with "var x= $("#dateSalary").val();" and it doesn't works too. I tried to retreive a value from an input type number and it works perfectly!

So if any one have an idea about this or a help support that i should follow, leave me a comment.

Thank you

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

3 Replies
Kirill Chuvilin
Try this
<input type="date" />
<button onclick="buttonClick()">Click</button>
<script>
    function buttonClick() {
        console.log($('input[type="date"]').datetimepicker('value'));	
    }
</script>
Kirill Chuvilin
Please see TizenWinset sample app. There are a lot of interesting there ;)
wiem hjiri
Thank you very much :)