Jump to content

AtkDateTimeNewAttribute

From NusaATK
Revision as of 16:16, 3 November 2008 by Yotmv (talk | contribs) (New page: {{howto|Advanced|yotmv <brian@bcm.nu>}} This is a modified version of the atkDateTimeAttribute to handle setting default values on the fly. The parameters for it are passed as arrays...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ATK Howto: AtkDateTimeNewAttribute

Complexity: Advanced
Author: yotmv <brian@bcm.nu>

List of other Howto's

This is a modified version of the atkDateTimeAttribute to handle setting default values on the fly. The parameters for it are passed as arrays containing the necessary values


The formatting for calling the new constructor within the node is:

($name, $default_date_arg( $format_edit, $format_view, $date_min, $date_max ), $default_time_arg( $beginTime, $endTime, $steps, $default ), $flags)

Example:

$this->add(new atkDateTimeNewAttribute("sampleTime", array(,'D M j',,), array('0','23',array('0','15','30','45'),), AF_FORCE_LOAD|AF_OBLIGATORY));