hi
I'm trying work out how to enhance the dateField control
- when used as an itemRenderer for a dataGrid
- to allow freeform entry (not using the date picker)
to do two things:
- format the date display from the picker (only) to "DD/MM/YYYY"
- if Text entry is used
if (dataField.Text != "")
// gets around "Type Coercion failed: cannot convert " " to Date."
if !IsDate(dateString)
Alert.Show("Date Format Is Incorrect");
else convert the date:String to date:Date for the control
//(which is bound back to the dataGrid's data)
the field can be null so any onfocus or clicking-into or clearing is
perfectly OK
I've had a look at the DateFormatter and DateValidator classes but
can't see how to apply them to the dateField control (ie not a
standard textbox, even if you do get the value with
"DateField(event.target).selectedDate.Text")
if this means a custom control extending dateField then it will get
used in many places (ie: no explicit references back to the parent)
has anyone seen any working examples to get ideas from?
thanx
barry.b
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/