Page 1 of 2

hpwUtility hpwDateTimePickSet question

PostPosted: Tue Jun 06, 2006 2:46 pm
by cp4w
Code: Select all
Setvar "hpwDatePattern" "dd.mm.yyyy"
hpwDateTimePickSet "RDateTimePick1" "04.25.1959"


I keep on getting a German message that sounds like it is saying that it isn't a valid date.

this is coming from the example pub.

What am I doing wrong?

PostPosted: Tue Jun 06, 2006 3:54 pm
by Gaev
Steve:

Just a wild wild guess ... but could it have to do with ... "dd.mm.yyyy" vs. "04.25.1959" ... can't find the 4th day of the 25th month of 1959 ?

I was very young then, but if memory serves me right 1959 was a pretty average year ... 12 months ... 365 days ... Christmas fell on December/25 ... :lol:

PostPosted: Tue Jun 06, 2006 9:38 pm
by HPW
I think Gaev is right. Try:

Code: Select all
hpwDateTimePickSet "RDateTimePick1" "25.04.1959"

PostPosted: Wed Jun 07, 2006 7:10 am
by cp4w
Code: Select all
Setvar "hpwDatePattern" "yyyy.mm.dd"
hpwDateTimePickSet "RDateTimePick1" "2004.09.09"


Does not work

Code: Select all
Setvar "hpwDatePattern" "mm.dd.yyyy"
hpwDateTimePickSet "RDateTimePick1" "09.09.2004"


Does not work.

PostPosted: Wed Jun 07, 2006 8:07 am
by HPW
I think there is a misunderstanding here:

From the web site:
Changes 1.22:
Variable: [hpwDatePattern] to store pattern for output format.
Variable: [hpwTimePattern] to store pattern for output format.


From the demo-pub action code page1:
. hpwDatePattern=Output pattern for result
Setvar "hpwDatePattern" "yyyy-mm-dd"
Setvar "hpwTimePattern" "hh:nn:ss"


So as we are talking here about input and not the output/result,
it is always this way:
hpwDateTimePickSet "RDateTimePick1" "[day].[Mon].[Year]"

PostPosted: Thu Jun 08, 2006 6:53 am
by cp4w
Code: Select all
hpwDateTimePickSet "RDateTimePick1" "11.11.2004"

This is also not working.

PostPosted: Thu Jun 08, 2006 9:58 am
by HPW
I copied your command in the 'Set Date' button of the demp-pub and it works for me. Because of the defined OnChange-Action I get also the Alertbox with the new date.

So what do you make/have different?
Does the demo work for you out of the box?

PostPosted: Thu Jun 15, 2006 2:45 pm
by cp4w
I tried to download new hpwutility and I get the following message.

You don't have permission to access /anmeldung/html1/neobook/ on this server.
Apache/2.0.48 (Fedora) Server at www.hpwsoft.de Port 80

PostPosted: Thu Jun 15, 2006 11:03 pm
by HPW
Something seems to damaged one support-file on my site.
(Does stop all downloading)
Please try again. Sorry for any problems.

PostPosted: Fri Jun 16, 2006 10:18 am
by cp4w
Downloaded latest version and tried the sample pub and still getting the error.

PostPosted: Fri Jun 16, 2006 12:50 pm
by HPW
After setting my system to USA-locale I was able to reproduce the bug.
The set command was using system-settings for date format and run there into the error. New version 1.50 now uses a fixed format independent from the locale setting.

Sorry for the problem.
Please test.

PostPosted: Mon Jun 19, 2006 12:19 pm
by cp4w
Thanks, it works.

However another problem happens. When I click the arrow for the next month it automatically selects a date and executes the select subroutine. Also it continues automatically to keep on selecting the next month, it goes to July, August etc and does not stop.

PostPosted: Mon Jun 19, 2006 2:28 pm
by HPW
When I get some time, I have to check if I can add a OnClose action.

PostPosted: Mon Jun 19, 2006 2:52 pm
by cp4w
I think that it is has something to do with the alert action that gets fired of.
If I take out that action it does not go into a loop.

PostPosted: Mon Jun 19, 2006 10:27 pm
by HPW
I think that it is has something to do with the alert action that gets fired of.
If I take out that action it does not go into a loop.


Yes, the alert was only to demo, but it is not usefull here and shows this effect.
But changing month does fire the OnSelect by design, so it might be usefull to have a onClose.