Welcome! Log In Create A New Profile

Advanced

Popup Calendar in WebDev 11

Posted by Shahine 
Shahine
Popup Calendar in WebDev 11
May 20, 2008 09:20AM
Hi,

I need a calendar to allow users to select a date.

Has anyone managed adding the javascript calendars like "jscalendar", "dhtmlxCalendar" or something similar to a WebDev11 application?


The component example in the Webdev manual works but as it opens a new browser window, looks a bit clumsy.

Many thanks


Shahine
Fabrice Harari
Re: Popup Calendar in WebDev 11
May 20, 2008 11:51AM
Hi Shahine...

You do not need an external component to do that... You can display a calendar in a cell, and update it using ajax (user changes month)...

Everything is done in the browser code, it's very nice for the user

Best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile consulting
Shahine
Re: Popup Calendar in WebDev 11
May 20, 2008 06:39PM
Hi Fabrice

Thanks for responding to my message.

If I make a popup calendar using a cell, then I have to put that cell + all the code needed on every one of the forms that my application has. And there are lots & lots of forms.

That is why I was hoping for something that I could call at project level rathar than form level.

Unless there is another way of doing this that I don't know?



Many Thanks


Shahine
KenKnight
Re: Popup Calendar in WebDev 11
May 20, 2008 11:17PM
Hi,

Check out Matt Kruse's javascript calendar. mattkruse.com (I think).

Cheers!
Ken

[edit]

Here's another one that I just tested in a page. I really like this... mainly because it appears to work flawlessly in both IE and Firefox. I'd had some issues with the one above in Firefox.

http://www.meanfreepath.com/javascript_calendar/index.html



Edited 1 time(s). Last edit at 05/21/2008 02:55AM by KenKnight.
Jon Lau
Re: Popup Calendar in WebDev 11
May 21, 2008 06:35PM
Is there any example code in webdev for the popup calendar ?

Regards,

Jon Lau
KenKnight
Re: Popup Calendar in WebDev 11
May 22, 2008 04:07AM
I'll put together a quick sample project and put on the windevtutorials.com site for download.

My internet is currently spotty, so it may not happen this evening.

Cheers!
Ken
KenKnight
Re: Popup Calendar in WebDev 11
May 22, 2008 04:41AM
Ok, its up.

http://www.windevtutorials.com/downloads/epoch_calendar.zip

This is a dynamic site created in WB11.

Enjoy! smiling smiley
Ken
Shahine
Re: Popup Calendar in WebDev 11
May 23, 2008 08:50AM
The example was really useful.
Not just for the calendar but also how to use JavaScript code with WebDev.

This makes me think that there is a need for an on-line course or tutorials of some sort on the subject of integrating JavaScript code with WebDev. I cannot be the only WebDev user who has been trying to integrate JavaScript tools with WebDev only to be left frustrate.

The Epoch calendar works well, however there is one problem with it which stops me using it. After selecting a date from the calendar you loose the focus from the calling edit field. You are returned to the top of the form. This is not a problem if the form has a small number of fields. But if you have a large number of fields and the screen has scrolled down then it becomes a problem.

Do you know a way of returning back to your calling field (targetelement) after selecting a date?

Thanks very much.
Shahine
KenKnight
Re: Popup Calendar in WebDev 11
May 23, 2008 05:47PM
Hi,

I should be able to come up with a fix on the focus issue. It may wind up meaning that you have to supply the alias for the field you want it to move to after the return of the variable.

I've put the modified class up on WindevTutorials.com

http://www.windevtuorials.com/downloads/epoch_classes.js

The call should be changed from ;

dp_cal = new Epoch('dp_cal','popup',document.getElementById('A1'),false);

To;

dp_cal = new Epoch('dp_cal','popup',document.getElementById('A1'),document.getElementById('A2'),false);

The second getElementById is for specifying the field that you want move to after the calendar selection has returned a variable.


Cheers!
Ken



Edited 1 time(s). Last edit at 05/25/2008 12:13AM by KenKnight.
KenKnight
Re: Popup Calendar in WebDev 11
May 25, 2008 12:15AM
bump post (noticed the post didn't jump to top after I edited it to note the new class).

Cheers!
Ken
Shahine
Re: Popup Calendar in WebDev 11
May 27, 2008 09:13AM
Thanks Ken

I will check it out as soon as I get a chance. This has been a great help.


I think the ability to integrate 3-rd party JavaScript tools with WebDev could be fantastic for WebDev users. It leaves the user free to concentrate on the application logic. I am surprised PC Soft do not promote this feature more vigorously. More examples, more pages in the printed manuals, more "did you knows"

Many Thanks

Shahine
Shahine
Re: Popup Calendar in WebDev 11
June 05, 2008 09:01AM
Hi Ken,

I tried to download the epoch_classes.js but I cannot get to:

[www.windevtuorials.com] or
[www.windevtuorials.com] or
[www.windevtuorials.com]


Regards

Shahine
KenKnight
Re: Popup Calendar in WebDev 11
June 06, 2008 03:37AM
LOL!! terribly sorry about that. I left out a "t" in the domain name.

http://www.windevtutorials.com/downloads/epoch_classes.js or
http://www.windevtutorials.com/downloads or
http://www.windevtutorials.com

Cheers!
ken
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: