view datebox.urs @ 24:d314d2ec3300

Be able to obtain the name from a navItem
author Ron de Bruijn <rmbruijn@gmail.com>
date Sun, 04 Dec 2011 16:45:31 +0100
parents 554e342665fe
children 5905b56e0cd9
line wrap: on
line source
type t

(* The type of dateboxes, which are input elements allowing the user to select a
 * date from a popup calendar. *)

type date = {Year : int, Month : int, Day : int}
val date_eq : eq date
val date_ord : ord date
val time : date -> time
val date : time -> date
(* Type of dates and some useful utility functions. *)

val create : time -> transaction t
(* Get a datebox initially set to the given time. *)

val onChange : t -> (date -> transaction {}) -> transaction {}
(* Add an action to be run when the date changes. *)

val set : t -> date -> transaction {}
(* Call this to change the selected date. *)

val value : t -> signal date
(* Extract the current date value. *)

val gui_t : Gui.gui t []
(* Draws the datebox as a piece of xml. *)