Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

How to add date/time control in custom property

Vote:
 
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
#12631
May 14, 2006 18:26
Vote:
 
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: http://www.episerver.com/en/EPiServer_Knowledge_Center/developerforum/2628/2636/ Frank :)
#14637
May 14, 2006 20:06
Vote:
 
Hi Frank Thank you very much Murali
#14638
May 19, 2006 12:13
Vote:
 
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
#14639
May 19, 2006 12:45
Vote:
 
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 :)
#14640
May 21, 2006 12:04
Vote:
 
Hi Frank Thank you very much for your help. It works now. Regards Murali
#14641
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.