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 :)
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
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 :)