My Mighty Blog

Listen to me and label every single thing I say as a 'fact'. You do it for the news networks, why not me??? These are my views on current events, family, news, government, technology, internet, programming, and whatever else pops into my head.

My Photo
Name:
Location: Central Florida, United States

Good Ol' Boy turned nerd

Previous Posts
Visit the Site

Powered by Blogger

MARVEL and SPIDER-MAN: TM & © 2007 Marvel Characters, Inc. Motion Picture © 2007 Columbia Pictures Industries, Inc. All Rights Reserved. © 2007 Sony Pictures Digital Inc. All rights reserved.
How to Implement the Client-Side DotNetNuke Calendar
Monday, March 19, 2007 |

There is a handy-dandy little calendar control that DotNetNuke (DNN) uses to insert a date value into a textbox control. However, it is not obvious in its usage. If you look at the source of any of the core modules or admin modules that use the control, you will see the following code in the HTML.





If you look in the code-behind for this, you will notice that there are no events assigned to this control. In order for this control to be used like the core modules do, you need to "invoke" the calendar in the Page_Load event. This "InvokePopupCal" method must be fired every time the module reloads. So, do not put it within a Postback If statement.



'this needs to always execute so the client script code is registered using InvokePopupCal


The code above actually handles all of the client-side code that will be needed for the calendar to insert the date like you expect it to. Be sure to pay attention to the control that you pass into the "Field" argument (txtPickUpDate above). This is the control that the script will attempt to insert the date into. Although I have not tested this out, I believe that the only control this should work with is a textbox control.

Labels: , , ,

posted by The Mighty Will @ permalink  

1 Comments:

  • At 1:06 AM , Anonymous Anonymous said...

    Just wanted to thank you for your tip on using the DNN Calendar.

    I was able to cut and paste and voila get it working.

    Peace, Paul

     

Post a Comment

Subscribe to Post Comments [Atom]

<< Home