## EDateEdit EDateEdit |

## Functions

GtkWidget * | e_date_edit_new ()
void | e_date_edit_set_editable ()
gboolean | e_date_edit_date_is_valid ()
gboolean | e_date_edit_time_is_valid ()
time_t | e_date_edit_get_time ()
void | e_date_edit_set_time ()
gboolean | e_date_edit_get_date ()
void | e_date_edit_set_date ()
gboolean | e_date_edit_get_time_of_day ()
void | e_date_edit_set_time_of_day ()
void | e_date_edit_set_date_and_time_of_day ()
gboolean | e_date_edit_get_show_date ()
void | e_date_edit_set_show_date ()
gboolean | e_date_edit_get_show_time ()
void | e_date_edit_set_show_time ()
GDateWeekday | e_date_edit_get_week_start_day ()
void | e_date_edit_set_week_start_day ()
gboolean | e_date_edit_get_show_week_numbers ()
void | e_date_edit_set_show_week_numbers ()
gboolean | e_date_edit_get_use_24_hour_format ()
void | e_date_edit_set_use_24_hour_format ()
gboolean | e_date_edit_get_allow_no_date_set ()
void | e_date_edit_set_allow_no_date_set ()
void | e_date_edit_get_time_popup_range ()
void | e_date_edit_set_time_popup_range ()
gboolean | e_date_edit_get_make_time_insensitive ()
void | e_date_edit_set_make_time_insensitive ()
gboolean | e_date_edit_get_twodigit_year_can_future ()
void | e_date_edit_set_twodigit_year_can_future ()
void | e_date_edit_set_get_time_callback ()
GtkWidget * | e_date_edit_get_entry ()
gboolean | e_date_edit_has_focus ()
gint | e_date_edit_get_shorten_time ()
void | e_date_edit_set_shorten_time ()
gboolean | e_date_edit_get_shorten_time_end ()
void | e_date_edit_set_shorten_time_end ()
const gchar * | e_date_edit_get_date_format ()
void | e_date_edit_set_date_format ()

## Properties

gboolean | allow-no-date-set | Read / Write
gboolean | set-none | Write / Construct Only
int | shorten-time | Read / Write
gboolean | shorten-time-end | Read / Write
gboolean | show-date | Read / Write
gboolean | show-time | Read / Write
gboolean | show-week-numbers | Read / Write
gboolean | twodigit-year-can-future | Read / Write
gboolean | use-24-hour-format | Read / Write
EDateWeekday | week-start-day | Read / Write

## Signals

void | changed | Run First

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── EDateEdit

## Description

## Functions

### e_date_edit_new ()

    GtkWidget *
    e_date_edit_new (void);

Creates a new EDateEdit widget which can be used to provide an easy to use way for entering dates and times.

#### Returns

a new EDateEdit widget.

### e_date_edit_set_editable ()

    void
    e_date_edit_set_editable (EDateEdit *dedit,
                              gboolean editable);

Allows the programmer to disallow editing (and the popping up of the calendar widget), while still allowing the user to select the date from the GtkEntry.

#### Parameters

dedit | an EDateEdit |
editable | whether or not the widget should accept edits. |

### e_date_edit_date_is_valid ()

    gboolean
    e_date_edit_date_is_valid (EDateEdit *dedit);

Returns TRUE if the last date entered was valid.

Note that if this returns FALSE, you can still use `e_date_edit_get_time()` or `e_date_edit_get_date()` to get the last time or date entered which was valid.

#### Parameters

dedit | an EDateEdit |

#### Returns

TRUE if the last date entered was valid.

### e_date_edit_time_is_valid ()

    gboolean
    e_date_edit_time_is_valid (EDateEdit *dedit);

Returns TRUE if the last time entered was valid.

Note that if this returns FALSE, you can still use `e_date_edit_get_time()` or `e_date_edit_get_time_of_day()` to get the last time or time of the day entered which was valid.

#### Parameters

dedit | an EDateEdit |

#### Returns

TRUE if the last time entered was valid.

### e_date_edit_get_time ()

    time_t
    e_date_edit_get_time (EDateEdit *dedit);

Returns the last valid time entered. If empty times are valid, by calling `e_date_edit_set_allow_no_date_set()`, then it may return -1.

Note that the last time entered may actually have been invalid. You can check this with `e_date_edit_time_is_valid()`.

#### Parameters

dedit | an EDateEdit |

#### Returns

the last valid time entered, or -1 if the time is not set.

### e_date_edit_set_time ()

    void
    e_date_edit_set_time (EDateEdit *dedit,
                          time_t the_time);

Changes the displayed date and time in the EDateEdit widget to be the one represented by `the_time` . If `the_time` is 0 then current time is used. If it is -1, then the date is set to None.

Note that the time is converted to local time using the Unix timezone, so if you are using your own timezones then you should use `e_date_edit_set_date()` and `e_date_edit_set_time_of_day()` instead.

#### Parameters

dedit | an EDateEdit |
the_time | The time and date that should be set on the widget |

### e_date_edit_get_date ()

    gboolean
    e_date_edit_get_date (EDateEdit *dedit,
                          gint *year,
                          gint *month,
                          gint *day);

Returns the last valid date entered into the date field.

#### Parameters

dedit | an EDateEdit |
year | returns the year set. |
month | returns the month set (1 - 12). |
day | returns the day set (1 - 31). |

#### Returns

TRUE if a time was set, or FALSE if the field is empty or 'None'.

### e_date_edit_set_date ()

    void
    e_date_edit_set_date (EDateEdit *dedit,
                          gint year,
                          gint month,
                          gint day);

Sets the date in the date field.

#### Parameters

dedit | an EDateEdit |
year | the year to set. |
month | the month to set (1 - 12). |
day | the day to set (1 - 31). |

### e_date_edit_get_time_of_day ()

    gboolean
    e_date_edit_get_time_of_day (EDateEdit *dedit,
                                 gint *hour,
                                 gint *minute);

Returns the last valid time entered into the time field.

#### Parameters

dedit | an EDateEdit |
hour | returns the hour set, or 0 if the time isn't set. |
minute | returns the minute set, or 0 if the time isn't set. |

#### Returns

TRUE if a time was set, or FALSE if the field is empty or 'None'.

### e_date_edit_set_time_of_day ()

    void
    e_date_edit_set_time_of_day (EDateEdit *dedit,
                                 gint hour,
                                 gint minute);

Sets the time in the time field.

#### Parameters

dedit | an EDateEdit |
hour | the hour to set, or -1 to set the time to None (i.e. empty). |
minute | the minute to set. |

### e_date_edit_set_date_and_time_of_day ()

    void
    e_date_edit_set_date_and_time_of_day (EDateEdit *dedit,
                                          gint year,
                                          gint month,
                                          gint day,
                                          gint hour,
                                          gint minute);

### e_date_edit_get_show_date ()

    gboolean
    e_date_edit_get_show_date (EDateEdit *dedit);

Returns TRUE if the date field is currently shown.

#### Parameters

dedit | an EDateEdit |

#### Returns

Whether the date field is shown.

### e_date_edit_set_show_date ()

    void
    e_date_edit_set_show_date (EDateEdit *dedit,
                               gboolean show_date);

Specifies whether the date field should be shown. The date field would be hidden if only a time needed to be entered.

#### Parameters

dedit | an EDateEdit |
show_date | TRUE if the date field should be shown. |

### e_date_edit_get_show_time ()

    gboolean
    e_date_edit_get_show_time (EDateEdit *dedit);

Returns TRUE if the time field is currently shown.

#### Parameters

dedit | an EDateEdit |

#### Returns

Whether the time field is shown.

### e_date_edit_set_show_time ()

    void
    e_date_edit_set_show_time (EDateEdit *dedit,
                               gboolean show_time);

Specifies whether the time field should be shown. The time field would be hidden if only a date needed to be entered.

#### Parameters

dedit | an EDateEdit |
show_time | TRUE if the time field should be shown. |

### e_date_edit_get_week_start_day ()

    GDateWeekday
    e_date_edit_get_week_start_day (EDateEdit *dedit);

Returns the week start day currently used in the calendar popup.

#### Parameters

dedit | an EDateEdit |

#### Returns

a GDateWeekday

### e_date_edit_set_week_start_day ()

    void
    e_date_edit_set_week_start_day (EDateEdit *dedit,
                                    GDateWeekday week_start_day);

Sets the week start day to use in the calendar popup.

#### Parameters

dedit | an EDateEdit |
week_start_day | a GDateWeekday |

### e_date_edit_get_show_week_numbers ()

    gboolean
    e_date_edit_get_show_week_numbers (EDateEdit *dedit);

### e_date_edit_set_show_week_numbers ()

    void
    e_date_edit_set_show_week_numbers (EDateEdit *dedit,
                                       gboolean show_week_numbers);

### e_date_edit_get_use_24_hour_format ()

    gboolean
    e_date_edit_get_use_24_hour_format (EDateEdit *dedit);

### e_date_edit_set_use_24_hour_format ()

    void
    e_date_edit_set_use_24_hour_format (EDateEdit *dedit,
                                        gboolean use_24_hour_format);

### e_date_edit_get_allow_no_date_set ()

    gboolean
    e_date_edit_get_allow_no_date_set (EDateEdit *dedit);

### e_date_edit_set_allow_no_date_set ()

    void
    e_date_edit_set_allow_no_date_set (EDateEdit *dedit,
                                       gboolean allow_no_date_set);

### e_date_edit_get_time_popup_range ()

    void
    e_date_edit_get_time_popup_range (EDateEdit *dedit,
                                      gint *lower_hour,
                                      gint *upper_hour);

### e_date_edit_set_time_popup_range ()

    void
    e_date_edit_set_time_popup_range (EDateEdit *dedit,
                                      gint lower_hour,
                                      gint upper_hour);

### e_date_edit_get_make_time_insensitive ()

    gboolean
    e_date_edit_get_make_time_insensitive (EDateEdit *dedit);

Returns TRUE if the time field is made insensitive instead of hiding it.

#### Parameters

dedit | an EDateEdit |

#### Returns

Whether the time field is be made insensitive instead of hiding it.

### e_date_edit_set_make_time_insensitive ()

    void
    e_date_edit_set_make_time_insensitive (EDateEdit *dedit,
                                           gboolean make_insensitive);

Specifies whether the time field should be made insensitive rather than hiding it. Note that this doesn't make it insensitive - you need to call `e_date_edit_set_show_time()` with FALSE as show_time to do that.

This is useful if you want to disable the time field, but don't want it to disappear as that may affect the layout of the widgets.

#### Parameters

dedit | an EDateEdit |
make_insensitive | TRUE if the time field should be made insensitive instead of hiding it. |

### e_date_edit_get_twodigit_year_can_future ()

    gboolean
    e_date_edit_get_twodigit_year_can_future
                                   (EDateEdit *dedit);

### e_date_edit_set_twodigit_year_can_future ()

    void
    e_date_edit_set_twodigit_year_can_future
                                   (EDateEdit *dedit,
                                    gboolean value);

### e_date_edit_set_get_time_callback ()

    void
    e_date_edit_set_get_time_callback (EDateEdit *dedit,
                                       EDateEditGetTimeCallback cb,
                                       gpointer data,
                                       GDestroyNotify destroy);

### e_date_edit_get_entry ()

    GtkWidget *
    e_date_edit_get_entry (EDateEdit *dedit);

### e_date_edit_has_focus ()

    gboolean
    e_date_edit_has_focus (EDateEdit *dedit);

### e_date_edit_get_shorten_time ()

    gint
    e_date_edit_get_shorten_time (EDateEdit *self);

### e_date_edit_set_shorten_time ()

    void
    e_date_edit_set_shorten_time (EDateEdit *self,
                                  gint minutes);

### e_date_edit_get_shorten_time_end ()

    gboolean
    e_date_edit_get_shorten_time_end (EDateEdit *self);

### e_date_edit_set_shorten_time_end ()

    void
    e_date_edit_set_shorten_time_end (EDateEdit *self,
                                      gboolean shorten_time_end);

### e_date_edit_get_date_format ()

    const gchar *
    e_date_edit_get_date_format (EDateEdit *self);

### e_date_edit_set_date_format ()

    void
    e_date_edit_set_date_format (EDateEdit *self,
                                 const gchar *strftime_format);

## Property Details

### The `“allow-no-date-set”` property

      “allow-no-date-set”        gboolean

Owner: EDateEdit

Flags: Read / Write

Default value: FALSE

### The `“set-none”` property

      “set-none”                 gboolean

Owner: EDateEdit

Flags: Write / Construct Only

Default value: FALSE

### The `“shorten-time”` property

      “shorten-time”             int

Owner: EDateEdit

Flags: Read / Write

Allowed values: [0,29]

Default value: 0

### The `“shorten-time-end”` property

      “shorten-time-end”         gboolean

Owner: EDateEdit

Flags: Read / Write

Default value: TRUE

### The `“show-date”` property

      “show-date”                gboolean

Owner: EDateEdit

Flags: Read / Write

Default value: TRUE

### The `“show-time”` property

      “show-time”                gboolean

Owner: EDateEdit

Flags: Read / Write

Default value: TRUE

### The `“show-week-numbers”` property

      “show-week-numbers”        gboolean

Owner: EDateEdit

Flags: Read / Write

Default value: TRUE

### The `“twodigit-year-can-future”` property

      “twodigit-year-can-future” gboolean

Owner: EDateEdit

Flags: Read / Write

Default value: TRUE

### The `“use-24-hour-format”` property

      “use-24-hour-format”       gboolean

Owner: EDateEdit

Flags: Read / Write

Default value: TRUE

### The `“week-start-day”` property

      “week-start-day”           EDateWeekday

Owner: EDateEdit

Flags: Read / Write

Default value: E_DATE_MONDAY

## Signal Details

### The `“changed”` signal

    void
    user_function (EDateEdit *edateedit,
                   gpointer   user_data)

Flags: Run First