Re: Help with validating a date input to a dialog
Re: Help with validating a date input to a dialog
- Subject: Re: Help with validating a date input to a dialog
- From: Michelle Steiner <email@hidden>
- Date: Fri, 30 Mar 2001 17:49:24 -0800
On 3/30/01 5:29 PM, Rob Jorgensen <email@hidden> wrote:
>
>display dialog (my setthedate("Please enter the date in format
>
>"mm/dd/yyyy"."))
>
>
>
>on setthedate(prompt)
>
> set DateToSend to (text returned of (display dialog prompt default
>
>answer ""))
>
> try
>
> date DateToSend
>
> on error
>
> my setthedate("Please us the correct format "mm/dd/yyyy"")
>
> end try
>
> return DateToSend
>
>end setthedate
>
>
>
>
This script performs as expected on my system (OS 9.1/AppleScript
>
1.6/No Language kits installed/No OS X). I tried it in Script Editor,
>
Script Debugger and as an application.
When you enter something with a wrong format, then enter again with a
correct format, it returns the second entry?
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------