Solved

Help with DateTimePicker

Posted on 2007-03-29
14
504 Views
Last Modified: 2011-09-20
Hi,
I want to have a Date Picker in an HTML page, for an "intranet" application, not served by a web server, but it just runs the code on the htm page.
I'm trying this in the form:
<object classid="java:com.ms.wfc.ui.DateTimePicker" id="DateTimePicker" align="middle" height="30" width="300"> </object>
but when running the page with internet explorer 6 or more, I just get a small square with a red X inside.

What am I doing wrong? How do I have to set the browser options, security zones, etc?

Thanks!

P.D. I'm using Expression Web to edit it and it appears to be an active-x control.
0
Comment
Question by:drotkopf
14 Comments
 

Expert Comment

by:smoothcat11
ID: 18819550
0
 

Author Comment

by:drotkopf
ID: 18821143
I'm doing this now...

<td height="50" align="right" style="width: 368px">
<form><br><script>DateInput('callbackdate', true)</script></form>
</td>

And then, when a certain button is pressed, a javascript function is called and I want to get the date value. How do I do that? It's telling me that callbackdate is undefined.

Note, I don't have any other <form> ... </form> in the code.

Thanks.
0
 

Expert Comment

by:smoothcat11
ID: 18823485
<td align="left"><script>DateInput('DateWanted', true, 'MM/DD/YYYY')</script></td>

The form will post the variable DateWanted

In MM/DD/YYYY format.  You can change the format with this script to MM-DD-YYYY or whatever.  Thx
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:drotkopf
ID: 18823755
It doesn't work:

1. When I click on the calendar .jpg to bring up the calendar, it throws an error:
        Line: 80
        Char: 23
        Error: 'document.forms[...].elements is null or not an object.
It's referring to the calendarDateInput.js file:
        if (typeof document.forms[j].elements[i].type == 'string') {
Is that because I don't have <form></form> in my page?

2. Even if I don't use the calendar icon, but just choose the month & day from the pull downs, it doesn't carry the value until my javascript function when I alert(DateWanted.value).

Do you think you can help me out with either this js or with <object classid="java:com.ms.wfc.ui.DateTimePicker" id="DateTimePicker" align="middle" height="30" width="300"> </object> ?

Thanks!

0
 

Author Comment

by:drotkopf
ID: 18898826
smoothcat11, any helk with this?
0
 

Expert Comment

by:smoothcat11
ID: 18898869
DateInput('DateWanted', true, 'MM/DD/YYYY')

Did you try this?  DateWanted would be the value you gave the calander element.
0
 

Author Comment

by:drotkopf
ID: 18898887
Yes I did.
0
 

Expert Comment

by:smoothcat11
ID: 18899177
I'm not sure?
0
 

Author Comment

by:drotkopf
ID: 18899846
Do you know of any other JS or ActiveX control that I could download?
0
 

Author Comment

by:drotkopf
ID: 18983569
There should be a button here to declare a question forfeited...
0
 

Author Comment

by:drotkopf
ID: 19524136
Thanks!
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 19524369
Your welcome!  Sorry that there isn't a "button" but this gives us a chance to help. :)

Thanks for making the outcome clear.  Most questions aren't so easy to close.

b0lsc0tt
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 19544752
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question