class UIng::DateTimePicker

Overview

A native picker for local calendar and clock fields.

Time values are treated as wall-clock values: the setter copies their displayed date and time fields without converting them to another time zone. Values returned by the getter and callbacks use Time::Location.local. The original instant, offset, and location therefore do not round-trip when they differ from the local time zone.

Defined in:

uing/date_time_picker.cr

Constructors

Instance Method Summary

Instance methods inherited from class UIng::Control

delete(child : Control) delete, destroy : Nil destroy, detach : self detach, disable : Nil disable, enable : Nil enable, enabled? : Bool enabled?, enabled_to_user? : Bool enabled_to_user?, handle : Pointer(Void) handle, hide : Nil hide, parent : Control | Nil parent, released? : Bool released?, set_minimum_size(width : Int32, height : Int32) : Nil set_minimum_size, show : Nil show, to_unsafe to_unsafe, tooltip=(tooltip : String) : Nil
tooltip=(tooltip : Nil) : Nil
tooltip=
, toplevel? : Bool toplevel?, visible? : Bool visible?

Macros inherited from module UIng::BlockConstructor

block_constructor block_constructor

Constructor Detail

def self.new(*args, &) #

[View source]
def self.new(*args, **kwargs, &) #

[View source]
def self.new(type : Type | Symbol = Type::DateTime) #

[View source]

Instance Method Detail

def clear_on_changed : Nil #

Clears the callback; equivalent to #on_changed(nil).


[View source]
def on_changed(&block : Time -> Nil) : Nil #

Invokes the block with the displayed wall-clock value in Time::Location.local.


[View source]
def on_changed(callback : Nil) : Nil #

[View source]
def time : Time #

Returns the displayed wall-clock value in Time::Location.local.


[View source]
def time=(time : Time) : Nil #

Sets the displayed wall-clock fields from time without time-zone conversion.


[View source]
def to_unsafe #

[View source]