function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PerPer 

Date_picker

I'm using AJAX to create a sControl on which form there is a date input field. Is there a way to invoke the standard sfdc date-picker?
Thanks,
per
andyCandyC
I'm just going through these older posts and guess you may already have sussed this out.

If not, I did it as below:

Pick A Date

Make sure you include reference to .

Cheers
Andy
andyCandyC
In fact, try this without the HTML interpretation:

script language="JavaScript1.2" src="/js/functions.js"

and


a href="javascript:openPopupFocus('/home/calendar.jsp?form=yourformname&field=yourfieldname&mo=0', '_blank', 193, 148, 'width=193,height=148,resizable=yes,toolbar=no,status=no,scrollbars=no,menubar=no,directories=no,location=no,dependant=yes', true, true);" onclick="setLastMousePosition(event)">Pick A Date /a
Mike ShawalukMike Shawaluk
AndyC,

I've been playing with the date picker also, and wonder if you've managed to get an additional feature to work: namely, the date field I am populating has an "onChange=" event bound to it, which isn't being fired when the date picker populates the field. On further digging, I see that the calendar control calls the pick() function in /js/functions.js to fill in the picked date, and that function has a 4th parameter to invoke the destination box's onchange() event. However, the calendar control doesn't seem to be passing the necessary 4th parameter. Perhaps another parameter needs to be passed to /home/calendar.jsp?

Thanks,

- Mike

Message Edited by Mike Shawaluk on 11-21-2005 10:50 AM

Message Edited by Mike Shawaluk on 11-21-2005 10:50 AM

andyCandyC
Hi Mike

Try adding callOnchange=true to your parameter list when calling calendar.jsp.

Cheers
Andy
Mike ShawalukMike Shawaluk
Andy,

That worked, thanks! I had tried something similar, but I didn't have the spelling/case exactly as you supplied.

Thanks for your assistance in "reverse engineering" this code. (And, I'm looking forward to AJAX Beta 3, when we'll all have a supported date picker to use :)

- Mike
Chirag MehtaChirag Mehta

Thanx it hlped me toooo

Following is the code that worked for me

Make sure ...that u specify form name .....field name and the callonchange to true

<a href="javascript:openPopupFocus

('/home/calendar.jsp?form=form1&field=sdate&mo=0&callonchange=true', '_blank', 186, 170, 'width=186,height=170,resizable=yes,toolbar=no,status=no,scrollbars=no,menubar=no,directories=no,location=no,dependant=yes', true, true);"

class="datePicker"

title="Pick A Date (New Window)"

onclick="setLastMousePosition(event)"

id="sdatePopCal">

<img src="/s.gif" alt="Pick A Date (New Window)" class="datePickerIcon">

</a>

Now i m trying to get the current date / time as next to calendar pop up - help required on the same