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
gokubigokubi 

Faking new UI elements in S-Controls in Summer '07

To write nice UI in S-Controls, we've all gotten good at faking UI elements like object lookup fields, date pickers, etc. In summer '07 there is a new date picker, as well as field hover flyouts, field help text, and more.

I'm starting the process of reverse engineering how to do these in my S-Controls. It sure would be a boon if an SF.com employee would write up a couple examples of how to fake these things. It would save us all a ton of time!

I'm looing at the new datepicker right now and I'm getting there, and will post when I figure it out, but it would be eaiser if we all didn't have to reinvent the wheel.

Thanks as always,
Steve
MarkL.ax269MarkL.ax269
Steve, I'm working on the same thing and the new date picker is a very nice addition. Let us know if you have any success and I'll do the same. My two cents, this should be an easy widget to add to any UI element if we just knew the basics. Hello Salesforce? :)

Mark
steve_andersensteve_andersen
I created a package that makes it easy to implement the new DatePicker in an S-Control. It includes:
  • a sample s-control called DatePicker showing two date fields using this method, invoke this s-control to see the code in action and as an example of how to use it in your s-controls
  • a snippet of datepicker support functions
  • a snippet of CSS calls
  • a snippet of the table that makes up the calendar picker
  • a sinppet of general date formatting functions
Let me know if you find any issues. It would be nice to collaboratively make using the new date picker as easy as possible.

Enjoy,
Steve


steve_andersensteve_andersen
Here's a screencast of the package in action:
MarkL.ax269MarkL.ax269
Awesome! I spent about 3 hours digging into this yesterday and got close. I was working out a few issues when I saw your response. In 15 minutes I had incorporated your solution (which was frankly better organized than mine :) and had working date pickers in my scontrol. This is the kind of thing that should be in the toolkit and you've made it easy to implement. Thanks, and I'll let you know if I make any refinements.

Mark
MigMig
Hi Steve,

Thankyou very much for your AppexChange It's only awesome ! =) Really nice !
I have implement it in my salesforce but since yesterday I have a problem in Firefox That you have also ! In Internet explorer it works fine ...

When you click in the input text ( the calendar pop up doesn t show up ). My firebug ( extension of Firefox ) tell me this :
Error :

UserContext.ampm has no properties
return UserContext.ampm[0];

Error in library.js :
Code:
DateUtil.getAMSymbol = function() {
13138 if (UserContext.initialized) {
13139 return UserContext.ampm[0];
13140 } else {
13141 return "AM";
13142 }
13143}
13144


 I try to solve it but still does nothing ... :(

So If u can try to do something on it It would be really nice from you ...
Meanwhile thankyou very much for your nice work !

Can you please let me know if u catch that out ?

Really thankyou,
Kind Regards
Mig







MigMig
 UP !!!! :smileywink: