You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Paul Stanton <pa...@mapshed.com.au> on 2011/06/16 01:47:14 UTC
Re: datefield - no option to cancel?
except that if you move to the next month, and then back, the highlight
for the currently selected date is gone.
On 31/05/2011 7:03 PM, antalk wrote:
> DatePicker.prototype.goToNextMonth = function ()
> {
> var d = new Date(this._selectedDate);
> d.setDate(Math.min(d.getDate(), DatePicker.getDaysPerMonth(d.getMonth()
> + 1,
> d.getFullYear()))); // no need to catch dec -> jan for the year
> d.setMonth(d.getMonth() + 1);
> this._none = true;
> this.setDate(d,false);
> }
>
> DatePicker.prototype.goToPreviousMonth = function ()
> {
> var d = new Date(this._selectedDate);
> d.setDate(Math.min(d.getDate(), DatePicker.getDaysPerMonth(d.getMonth()
> - 1,
> d.getFullYear()))); // no need to catch jan -> dec for the year
> d.setMonth(d.getMonth() - 1);
> this._none = true;
> this.setDate(d,false);
> }
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org