Re: Date Values



On Thu, Jun 03, 2004 at 14:17:01 +1000, Daniel Kasak wrote:
I'm getting back to the idea of using Gtk2::TieScalar and 
Gtk2::TieArrayRef to tie fields on a form to an array, and use a helper 
object to load the array and handle updates.

We have a problem with date fields. People in Australia are expecting 
dates in the format dd-mm-yyyy, and everything else seems to be 
yyyy-mm-dd. To get around this, I have been using GtkCalendar, so they 
can click the date and not worry about manual input. But this won't work 
with a GtkCalendar, will it?

?? If you have been, already, using GtkCalendar (Gtk2::Calendar), you
should already know what works.

I've had a look at Gtk2::CellRendererDate in the examples directory ( 
which does a cool pop-down GtkCalendar ), but this only applies to cells 
in a TreeView, doesn't it? I want to have these laid out via glade on 
the form.

An editable renderer must provide a widget when editing is requested.
This widget will work stand-alone.

I can use MySQL's date_format() to format dates so they *look* familiar 
to people, but updating the database from data entered by people is a 
problem, unless my helper object somehow knows it's dealing with a date, 
and reverses the month / day fields.

A date entry is always dealing with dates. Is it not?

What options do I have?

1) Simply use Gtk2::Calendar (GtkCalendar)

2) Use a pop-down calednar:
    1) Create a non-editable entry, where the current date, in locale
       prefered format, will be displayed.
    2) Create a "pop-down" button (like combo has) right beside it.
    3) Create a dialog containing GtkCalendar
    4) On the button's clicked signal, pop up the dialog. On the dialogs
       closing, update the date.

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]