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

__parent__ __parent__, __set_parent__(parent) : Nil __set_parent__, 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?, show : Nil show, to_unsafe to_unsafe, toplevel? : Bool toplevel?, verify_set_parent(parent) : Nil verify_set_parent, 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 : Symbol) #

[View source]
def self.new #

[View source]

Instance Method Detail

def on_changed(&block : Time -> Nil) : Nil #

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


[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]