How to add date/time control in custom property

Hi I am trying to create a custom property, in that how to add episerver's inbuilt property of date/time control. Thankx in advance. Murali
May 14, 2006 18:26
When building a custom property in EPiServer, you add the EPiServer builtin web controls (f.ex. PropertyPageReference or PropertyDate in your case) the same way as .NET's web controls (f.ex. TextBox or Button). EPiServer's builtin web control PropertyDate has a public property called Date, which will contain the date the user has selected from the popup window. See this page for some samples on creating custom properties: Frank :)
May 14, 2006 20:06
Hi Frank Thank you very much Murali
May 19, 2006 12:13
Hi Frank PropertyDate is not a part of Episerver WebControl, it is Episerver.Core.PropertyDate, When I try to create it says "cannot convert from 'EPiServer.Core.PropertyDate' to 'System.Web.UI.Control' " The code goes here, private EPiServer.Core.PropertyDate calDateOfNews; CopyWebAttributes( Container, calDateOfNews ); Please help, Murali
May 19, 2006 12:45
Hi. You are quite correct. You have to manually build this property up with a TextBox and a HtmlInputButton. See the Image HTML sample for example code. In this sample, the image dialog box is opened, using the script function "PropertyImageHtmlDialog". To find out what to use to open the Date dialog box, edit a page in you Sample Site, and right-click to view source. You can search for the string "OpenDateBrowser". That should give you a head start. Hope this helps. Frank :)
May 21, 2006 12:04
Hi Frank Thank you very much for your help. It works now. Regards Murali
May 23, 2006 14:31
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.