Recent Weblogs

Links I like

DateChooser, decoupled objects make for an easy interface.

Built with prototype and a new style of event architecture allows for an all around easier grid API. Continued with an incredibly easy to use implementation of a date chooser.

Locale Time

UTC

Time


Superclasses and Details

This demonstration is built using a small package of javascript classes that use the prototypejs library.

  • GridBase an abstract javascript class that introduces a comprehensive grid event API. Ideal for subclasses to take advantage for click and drag or mouse over cell events.
  • GridBuild further extends the GridBase class to introduce more methods for handling dynamic grid construction as well as easy data injection.
  • GregorianCalendar a subclass of prototype's ObjectRange class. Defines a range of dates to represent a month.
  • CalendarSelect extends GridBuild, using an instance of GregorianCalendar formats the data into a grid.
  • DateSelect extends CalendarSelect, enhances the interface to include convienence controls.
  • View Pure Demo Inspired by a comment on a previous post I have created a page that is an HTML document with only what is necessary for implementing the date chooser widget.

Addressing Comments

Some very helpful comments on this article which is pleasing to see. To address Jon and Alex's concerns I have developed a new subclass of CalendarSelect that uses two select boxes to engage the user, view the Demo.

To address Artemis's concerns I would suggest subclassing DateSelect and override the applyCellJSON function which is where you could implement special logic to assign more attributes to the cell for easier retrieval. Note that if you're looking to do something with a cell when it is clicked you can use the "cellclick" event, which is defined in GridBase .

Comments

September 17, 2007Jon

No easy way to choose a year - if you're looking for something 2 years in the future, it's 24 clicks ;)

September 18, 2007Kari Pätilä

Also, I don't think that "Septmeber" is a valid name for a month. Add some finishing touches and you'll got yourself a great widget.

September 20, 2007Alex

please make choosing the year easier :)

September 22, 2007Artemis

Is there a way to define an id to the dates? I would like to be able to have <td id="1" class="event">1</td> if possible... >.>

November 15, 2007SillyCone

Amazing, thanks a lot !
Who are you people to judge the package for a few typos ???

November 21, 2007Jonas

It seems there is

November 21, 2007Jonas

It seems there is a bug in the control with dates before the year 100. The script loops over a huge range of dates starting at the chosen year and ending in the year 1901. This causes the browser to lock up for several minutes. I know this sounds like an irrelevant fringe case but it is kind of annoying since the default minimum date is January 1st year 1 in C#. Any idea how to fix this?

January 23, 2008ss

Put year and month into inplace.editor.dropdown and this component will be more usable

March 31, 2008wared

Hi,
I'm french, and I want the week to start on Monday (M, T, W, T...). Could you tell me how to do that ? Thanks a lot.

April 11, 2008Greg

Hi,
Are there any plans to update this to use the newer style of inheritance in prototype?
Is there anywhere I can download a single package that contains all the files? There doesn't appear to be any versioning in the individual source files, and I'm a little concerned about confusion in the future if certain parts get updated. Having some kind of 'release' would be handy.
It does look good though, and the potential for extensability is a massive pluspoint, but it does seem to be coming at the expense of getting up and running quicikly to try it out.

June 12, 2008eg sgegesg

Cxzv dxdv
segf es
segse
gseg
segseg ges
gsegse
gseg
bdg
sef
sg
rhsegseg
segdth
r
segsegsegse

September 18, 2008Heart of the Computer

Thanks

September 21, 2008muhabbet

Thank you very much

October 12, 2008buy old movies

It’s very good article.

October 17, 2008travesti

thanks

October 19, 2008evden eve nakliyat

Thank you very much

October 29, 2008figurin

Thank you very much for this information.
Good post thanks for sharing.
I like this site ;)

November 10, 2008voyance

Cool concept and good work ! Et si vous cherchez un bon site de voyance, contactez moi !

November 11, 2008glycoscience

Thanks for sharing this info with us..
i really enjoyed the stuff you have executed..
thank you.

November 21, 2008evden eve nakliyat

Beautiful! It’s my favorite WP template. Thank you

November 25, 2008sex shop

True. i used to be a musician for over 15 years - but than i figured out someday that making some money would also be nice. So i changed the industry. I´wwouln´t be able to do a 9 to 5 job with a boss watching over me and everything strictly regulated. So i still do my own stuff, not THAT creative anymore but alos in my new job i try to to it my own way...and it works. Creativity ist the echo of life in ourselve... we should never loose it.

November 25, 2008car hifi

great man.. great to see post over here.
thanks.

November 26, 2008vBulletin

thanx for web blog page

November 30, 2008Arkadaş

veryy Good site Thanks You!

December 01, 2008travesti

thanks

December 03, 2008Göğüs Estetiği

Ok, I have an inkling (pun not intended) to modify that book image to the right to say "Schneier on Squid."
"The closest the squid industry has to a rock star."

December 04, 2008turbo kits

Put year and month into inplace.editor.dropdown and this component will be more usable..
thanks..

December 05, 2008marwan

how can i download the code ?

Name
Site
Comment
  CAPTCHA Image
Reload Captcha Image
Captcha