The 90th Percentile
The coolest prototype calendar ever
Roberto has been doing amazing things with calendars these days. With current loom trunk, this java attribute:@Temporal(TemporalType.TIMESTAMP)@DateValidation(minValue="today + 1d", maxValue="today + 1y")private Date start;With this javascript code:// create calendar$$('input.date, input.dateTime').each( loom.ui.createCalendar, {});Renders this absolute piece of awesomeness:
- Dates before today and after one year (from today) are disabled, as specified by @DateValidation. As always, the server side will use the same constraints.
- The use of @Temporal (the standard JPA annotation) triggers the interface to ask for date and time. The default would only ask for a date.
- It uses the same attributes (min, max) and format (ISO-8601) specified by the HTML 5 draft, which should help replacing it when browser support arrives by 2025 :)
- Full implementation of the PHP strftime format.
Other use cases may be tested here, as the javascript library can be used standalone without loom.MY PRECIOUSSSSSSSSS...
The blog that shares the passion about the how and why of our projects.