annotate datebox.urs @ 34:2d195bee1efa

CKeditor wrapper
author Adam Chlipala <adam@chlipala.net>
date Thu, 21 Nov 2013 18:19:02 -0500
parents 5905b56e0cd9
children
rev   line source
adam@20 1 type t
rmbruijn@19 2
adam@20 3 (* The type of dateboxes, which are input elements allowing the user to select a
adam@20 4 * date from a popup calendar. *)
adam@2 5
adam@4 6 type date = {Year : int, Month : int, Day : int}
kkallio@14 7 val date_eq : eq date
adam@5 8 val date_ord : ord date
adam@5 9 val time : date -> time
kkallio@12 10 val date : time -> date
kkallio@14 11 (* Type of dates and some useful utility functions. *)
adam@4 12
adam@20 13 val create : time -> transaction t
kkallio@14 14 (* Get a datebox initially set to the given time. *)
kkallio@14 15
adam@20 16 val onChange : t -> (date -> transaction {}) -> transaction {}
kkallio@14 17 (* Add an action to be run when the date changes. *)
kkallio@14 18
adam@20 19 val set : t -> date -> transaction {}
kkallio@14 20 (* Call this to change the selected date. *)
kkallio@14 21
adam@20 22 val value : t -> signal date
kkallio@14 23 (* Extract the current date value. *)
kkallio@14 24
adam@27 25 val gui_t : Gui.gui t body'
kkallio@14 26 (* Draws the datebox as a piece of xml. *)