Solved

Help with DateTimePicker

Posted on 2007-03-29
14
502 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

777 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