template::widget::monthFragment (public)

 template::widget::monthFragment element_reference fragment size type \
    value [ mode ] [ tag_attributes ]

Defined in packages/acs-templating/tcl/date-procs.tcl

Create a month entry widget with short or long month names.

Parameters:
element_reference (required)
fragment (required)
size (required)
type (required)
value (required)
mode (optional, defaults to "edit")
tag_attributes (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 template::util::date::get_property template::util::date::get_property (public) template::util::date::monthName template::util::date::monthName (public) template::widget::menu template::widget::menu (public) template::widget::monthFragment template::widget::monthFragment template::widget::monthFragment->template::util::date::get_property template::widget::monthFragment->template::util::date::monthName template::widget::monthFragment->template::widget::menu

Testcases:
No testcase defined.
Source code:
    variable ::template::util::date::month_data

    upvar $element_reference element
    array set attributes $tag_attributes

    set value [template::util::date::get_property $fragment $value]

    if { $mode ne "edit" } {
        set output {}
        if { $value ne "" } {
            append output "<input type=\"hidden\" name=\"$element(name).$fragment\" value=\"$value\">"
            append output [template::util::date::monthName $value $size]
        }
        return $output
    } else {
        set options [list [list "--" {}]]
        for { set i 1 } { $i <= 12 } { incr i } {
            lappend options [list [template::util::date::monthName $i $size$i]
        }

        return [template::widget::menu  "$element(name).$fragment" $options $value attributes]
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: