Solved

Help with DateTimePicker

Posted on 2007-03-29
14
499 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
 

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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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. …
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now