Hey Guys, I am looking for a good datechooser that works with prototype. I''ve seen a few other approaches but they''re such a mess, who''s got some clean code to create a simple JS based datechooser? Cheers, Matt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Foster wrote:> Hey Guys, > > I am looking for a good datechooser that works with > prototype....Have you looked at http://datetime.toolbocks.com/ ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
that one looks nice i''ll have to give it a shot currently using http://www.mattkruse.com/javascript/calendarpopup/ On 9/7/07, Ken Snyder <kendsnyder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Matt Foster wrote: > > Hey Guys, > > > > I am looking for a good datechooser that works with > > prototype.... > Have you looked at http://datetime.toolbocks.com/ ? > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
at the risk of sounding like a total newb i''m not sure what you mean by "stay in the same DOM" if you looked at more than the first example you''ll see that not all of them create popup windows. On 9/7/07, Matt Foster <mattfoster01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hey Guys, > > > These are great suggestions and right in line with what I asked > for, unfortunately Brian''s uses a window pop out and i really want to > stay in the same DOM, and Ken''s is an extension of the dynarch > calendar which very well could be the heaviest implementation I''ve > seen. Thanks again guys but I think i''ll have to look closer. > > > Cheers, > Matt > > > > On Sep 7, 2:09 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > that one looks nice i''ll have to give it a shot > > > > currently using > > > > http://www.mattkruse.com/javascript/calendarpopup/ > > > > On 9/7/07, Ken Snyder <kendsny...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Matt Foster wrote: > > > > Hey Guys, > > > > > > I am looking for a good datechooser that works with > > > > prototype.... > > > Have you looked athttp://datetime.toolbocks.com/? > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Brian, What i meant by stay in the DOM was to say that i don''t want to access anything higher than the document object. pop ups have been a very common red flag for me in my quest for the right datechooser. I''ll have to take another look at your example, and see how to customize. On Sep 7, 5:15 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> at the risk of sounding like a total newb i''m not sure what you mean by > "stay in the same DOM" > > if you looked at more than the first example you''ll see that not all of them > create popup windows. > > On 9/7/07, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hey Guys, > > > These are great suggestions and right in line with what I asked > > for, unfortunately Brian''s uses a window pop out and i really want to > > stay in the same DOM, and Ken''s is an extension of the dynarch > > calendar which very well could be the heaviest implementation I''ve > > seen. Thanks again guys but I think i''ll have to look closer. > > > Cheers, > > Matt > > > On Sep 7, 2:09 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > that one looks nice i''ll have to give it a shot > > > > currently using > > > >http://www.mattkruse.com/javascript/calendarpopup/ > > > > On 9/7/07, Ken Snyder <kendsny...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Matt Foster wrote: > > > > > Hey Guys, > > > > > > I am looking for a good datechooser that works with > > > > > prototype.... > > > > Have you looked athttp://datetime.toolbocks.com/?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I just had an idea, this is by no means a suggestion to the core API but... Wouldn''t it be nice to have an extension of the Range class to handle a Range of Dates, that could certainly help the implementation of a date chooser! On Sep 9, 2:20 pm, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey Brian, > > What i meant by stay in the DOM was to say that i don''t want to > access anything higher than the document object. pop ups have been a > very common red flag for me in my quest for the right datechooser. > I''ll have to take another look at your example, and see how to > customize. > > On Sep 7, 5:15 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > at the risk of sounding like a total newb i''m not sure what you mean by > > "stay in the same DOM" > > > if you looked at more than the first example you''ll see that not all of them > > create popup windows. > > > On 9/7/07, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hey Guys, > > > > These are great suggestions and right in line with what I asked > > > for, unfortunately Brian''s uses a window pop out and i really want to > > > stay in the same DOM, and Ken''s is an extension of the dynarch > > > calendar which very well could be the heaviest implementation I''ve > > > seen. Thanks again guys but I think i''ll have to look closer. > > > > Cheers, > > > Matt > > > > On Sep 7, 2:09 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > that one looks nice i''ll have to give it a shot > > > > > currently using > > > > >http://www.mattkruse.com/javascript/calendarpopup/ > > > > > On 9/7/07, Ken Snyder <kendsny...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Matt Foster wrote: > > > > > > Hey Guys, > > > > > > > I am looking for a good datechooser that works with > > > > > > prototype.... > > > > > Have you looked athttp://datetime.toolbocks.com/?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Update on that idea, i took a look into some innards of the Range object, it uses a succ method to find the next successive value between the ranges. It was really easy to implement my idea of a date range object, i just extended the Date.prototype to have a succ method to increase by one day. That is certainly debatable but its exactly what I need. Check it out Date.prototype.succ = function(){ var ret = new Date(this.getTime()); ret.setDate(this.getDate() + 1); return ret; } and then viola you should send two date objects to the $R function and you get a great little enumerable to step through a series of date objects! On Sep 9, 3:17 pm, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I just had an idea, this is by no means a suggestion to the core API > but... Wouldn''t it be nice to have an extension of the Range class to > handle a Range of Dates, that could certainly help the implementation > of a date chooser! > > On Sep 9, 2:20 pm, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hey Brian, > > > What i meant by stay in the DOM was to say that i don''t want to > > access anything higher than the document object. pop ups have been a > > very common red flag for me in my quest for the right datechooser. > > I''ll have to take another look at your example, and see how to > > customize. > > > On Sep 7, 5:15 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > at the risk of sounding like a total newb i''m not sure what you mean by > > > "stay in the same DOM" > > > > if you looked at more than the first example you''ll see that not all of them > > > create popup windows. > > > > On 9/7/07, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hey Guys, > > > > > These are great suggestions and right in line with what I asked > > > > for, unfortunately Brian''s uses a window pop out and i really want to > > > > stay in the same DOM, and Ken''s is an extension of the dynarch > > > > calendar which very well could be the heaviest implementation I''ve > > > > seen. Thanks again guys but I think i''ll have to look closer. > > > > > Cheers, > > > > Matt > > > > > On Sep 7, 2:09 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > that one looks nice i''ll have to give it a shot > > > > > > currently using > > > > > >http://www.mattkruse.com/javascript/calendarpopup/ > > > > > > On 9/7/07, Ken Snyder <kendsny...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Matt Foster wrote: > > > > > > > Hey Guys, > > > > > > > > I am looking for a good datechooser that works with > > > > > > > prototype.... > > > > > > Have you looked athttp://datetime.toolbocks.com/?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
This has been discussed more than once, and the core team always says that date functions are not something everybody needs, so they are not meant for core (heavy date logic is meant for the server). Anyway, by the magic of ObjectRange, you already have date ranges :D All you need to do is implement Date.prototype.succ to return the "next" element in the range. So, for example Date.prototype.succ = function() { return new Date(this.getFullYear(), this.getMonth(), this.getDate() + 1); } will return "tomorrow", and you can do var start = new Date(); var end = new Date(this.getFullYear(), this.getMonth(), this.getDate() + 7); $R(start, end) will then generate all the dates in this week. Best, -Nicolas On 9/9/07, Matt Foster <mattfoster01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I just had an idea, this is by no means a suggestion to the core API > but... Wouldn''t it be nice to have an extension of the Range class to > handle a Range of Dates, that could certainly help the implementation > of a date chooser! > > > > On Sep 9, 2:20 pm, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hey Brian, > > > > What i meant by stay in the DOM was to say that i don''t want to > > access anything higher than the document object. pop ups have been a > > very common red flag for me in my quest for the right datechooser. > > I''ll have to take another look at your example, and see how to > > customize. > > > > On Sep 7, 5:15 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > at the risk of sounding like a total newb i''m not sure what you mean by > > > "stay in the same DOM" > > > > > if you looked at more than the first example you''ll see that not all of them > > > create popup windows. > > > > > On 9/7/07, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hey Guys, > > > > > > These are great suggestions and right in line with what I asked > > > > for, unfortunately Brian''s uses a window pop out and i really want to > > > > stay in the same DOM, and Ken''s is an extension of the dynarch > > > > calendar which very well could be the heaviest implementation I''ve > > > > seen. Thanks again guys but I think i''ll have to look closer. > > > > > > Cheers, > > > > Matt > > > > > > On Sep 7, 2:09 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > that one looks nice i''ll have to give it a shot > > > > > > > currently using > > > > > > >http://www.mattkruse.com/javascript/calendarpopup/ > > > > > > > On 9/7/07, Ken Snyder <kendsny...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > Matt Foster wrote: > > > > > > > Hey Guys, > > > > > > > > > I am looking for a good datechooser that works with > > > > > > > prototype.... > > > > > > Have you looked athttp://datetime.toolbocks.com/? > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
You could try: http://www.eulerian.com/en/opensource/datepicker-prototype-scriptaculous It has some negative comments, but looks like a nice start On Sep 9, 2007, at 1:50 PM, Nicolás Sanguinetti wrote:> > This has been discussed more than once, and the core team always says > that date functions are not something everybody needs, so they are not > meant for core (heavy date logic is meant for the server). > > Anyway, by the magic of ObjectRange, you already have date ranges :D > All you need to do is implement Date.prototype.succ to return the > "next" element in the range. > > So, for example > > Date.prototype.succ = function() { > return new Date(this.getFullYear(), this.getMonth(), this.getDate > () + 1); > } > > will return "tomorrow", and you can do > > var start = new Date(); > var end = new Date(this.getFullYear(), this.getMonth(), this.getDate > () + 7); > > $R(start, end) will then generate all the dates in this week. > > Best, > -Nicolas > > On 9/9/07, Matt Foster <mattfoster01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> I just had an idea, this is by no means a suggestion to the core API >> but... Wouldn''t it be nice to have an extension of the Range class to >> handle a Range of Dates, that could certainly help the implementation >> of a date chooser! >> >> >> >> On Sep 9, 2:20 pm, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> Hey Brian, >>> >>> What i meant by stay in the DOM was to say that i don''t >>> want to >>> access anything higher than the document object. pop ups have >>> been a >>> very common red flag for me in my quest for the right datechooser. >>> I''ll have to take another look at your example, and see how to >>> customize. >>> >>> On Sep 7, 5:15 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>>> at the risk of sounding like a total newb i''m not sure what you >>>> mean by >>>> "stay in the same DOM" >>> >>>> if you looked at more than the first example you''ll see that not >>>> all of them >>>> create popup windows. >>> >>>> On 9/7/07, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>>>> Hey Guys, >>> >>>>> These are great suggestions and right in line with what I >>>>> asked >>>>> for, unfortunately Brian''s uses a window pop out and i really >>>>> want to >>>>> stay in the same DOM, and Ken''s is an extension of the dynarch >>>>> calendar which very well could be the heaviest implementation I''ve >>>>> seen. Thanks again guys but I think i''ll have to look closer. >>> >>>>> Cheers, >>>>> Matt >>> >>>>> On Sep 7, 2:09 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>> that one looks nice i''ll have to give it a shot >>> >>>>>> currently using >>> >>>>>> http://www.mattkruse.com/javascript/calendarpopup/ >>> >>>>>> On 9/7/07, Ken Snyder <kendsny...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>>>>>> Matt Foster wrote: >>>>>>>> Hey Guys, >>> >>>>>>>> I am looking for a good datechooser that works with >>>>>>>> prototype.... >>>>>>> Have you looked athttp://datetime.toolbocks.com/? >> >> >>> >> > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Everyone, I had been looking for an implementation of a date chooser. Many were close but I was really looking for something more...declouped. So i ended up taking a new approach, maybe because im left handed. What I wanted to do was build up the functionality of a grid and then stack on top of that the Calendar behavior. This is accomplished in a series of abstract javascript classes to form a fantastic implementation that uses an event dispatching mechanism to notify the interface of a date selection. Check it out if you''re interested in a very decoupled date chooser http://positionabsolute.net/blog/2007/09/javascript-date-chooser.php Cheers, Matt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---