Reputation:
I am able to show datepicker. But on native application User click the textfield and date picker is open .So I need to implement that functionality using titanium platform. can you suggest a way or give some example .When user click textfield it don't show keyboard only show datepicker ?
Upvotes: 2
Views: 4728
Reputation: 474
Its simple just add a datepicker in runtime.
Go through this link Demonstrates all
Datepicker on click of text box
Upvotes: 1
Reputation: 921
You have to set the editable
property of your textfield to false, then call your picker in the "click" callback of the textfield.
var textfield = Ti.UI.createTextField ({
editable: false // That way the keyboard won't show up
//your other textfield properties
});
textfield.addEventListener('click', function(e) {
showDatePicker();
});
Upvotes: 0