Reputation: 1614
The date format contains dd/mm/yyyy hh:mm:ss
which can be used in this manner using
<rich:calendar datePattern="dd/MM/yyyy HH:mm"
button.
but this gives option to modify only date (and may be along with time.)
value="#{uCBController.uCBUnit2.ucbEsp.lastSD}"
But what I want is when select this button , it should display only time to select and modify, and saves in time format only.
Upvotes: 0
Views: 3166
Reputation: 62864
Create two <rich:inputNumberSlider>
components (one for picking the hours and one for picking the minutes). <rich:calendar>
doesn't support picking only the time.
<rich:inputNumberSpinner value="#{bean.hours}" minValue="0" maxValue="23" />
<rich:inputNumberSpinner value="#{bean.minutes}" minValue="0" maxValue="59" />
Then, in the managed bean, just create two properties with the correspoding accessors.
public class Bean {
private Integer hours;
private Integer minutes;
//getters, setters
}
Upvotes: 2