I'm also getting the hang of it, slowly, and very happy to hear a question that I can answer!
One of the things about learning hobo is that you end up having to become intimately acquainted with certain aspects of its source code, particularly with rapid and dryml. I recently tweaked the input tag for date, changing the default order to month/day/year, and adjusting it to permit blank dates. All that required was to add :include_blank => true in the select_date call. Here's the tweaked input date (which I put in my application.dryml file). <def tag="input" for="date" attrs="order">%> <% order = order.nil? ? [:month, :day, :year] : comma_split (order).*.to_sym -%> <%= select_date(this, attributes.merge(:prefix => param_name_for_this, :order => order, :include_blank => true)) %> </def>%> In response to user complaints, I made date entry much more friendly by getting rid of the damn selects altogether. Turns out this was much easier than anticipated. Ruby, or rails, or some piece of code somewhere, is very smart about parsing dates -- this text field worked out of the gate, and can handle 1/1/2009 just as well as January 1, 2009. <def tag="input" for="date" attrs="order"> <%= text_field_tag(name, this, attributes) %> </def> Not high on my team's priority list, but I still want to figure out how to tweak the format that the text field displays the date. monty On Jun 3, 11:36 pm, oldlibmike <[email protected]> wrote: > I am getting the hang of some of the hobo basics but am still > wrestling with date fields. I get a 3 field data "picker" in the > default forms but I always get today's date as the value. Is there any > way to have the date be null? > > In my app, if an item is not sold, its date is null otherwise there is > a date in it. > > Thanks, > Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
