This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Android and the fly likes Date and Time Spinner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Date and Time Spinner" Watch "Date and Time Spinner" New topic
Author

Date and Time Spinner

ibrahim yener
Ranch Hand

Joined: Jul 22, 2013
Posts: 89

Hello
I want to know that how can i make date and time selected in spinner.

Let me give some example based on HTML

<select name="year">
<option value="2012">2012</option>
<option value="2013" selected="selected">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
</select>

Also, i have to date time spinner in my application and i want to set Date To spinner based on Date From spinner.

If user choose 2013/11/14 18:00 from Date From spinner (Every Date and Time has on separate spinner)
populate exact same date and time at Date To spinner.

It is exactly, Airline reservation calendar. If you choose Flight date From javascript populates automatically date To too.

Regards
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3934
    
  17

Your best choice is to use Date and Time pickers instead of spinners: http://developer.android.com/guide/topics/ui/controls/pickers.html

But it you want to use a spinner, then here is how to use them: http://developer.android.com/guide/topics/ui/controls/spinner.html


Steve
ibrahim yener
Ranch Hand

Joined: Jul 22, 2013
Posts: 89

Steve, you are great person.

I guess you are sitting there all day and just helping others. Great person
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3934
    
  17

Haha... thanks, you make me blush
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date and Time Spinner
 
Similar Threads
[Solved] EL doesn't work as per expectation
Unexpected tag <TABLE> found ,expecting one of <TD> ,<TH>
Pass value and Validate
how to Calculate fiscal month if start year and end date is given using JAVA
Yet another loop problem