More in this section
Forums / Sitefinity SDK / Question about the DatePicker How To In the Sitefinity Documentation

Question about the DatePicker How To In the Sitefinity Documentation

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Francis
    Francis avatar
    5 posts
    06 May 2009
    04 Nov 2011
    Link to this post
    I'm finally updating our site from SF3.7 to SF 4.2, and have a bunch of controls in SF3.7 that I had previously created Custom designers for.  Since the upgrade path for those custom designers doesn't seem super clear, I'm resigned to recreating the control, using the new custom ContentViewDesignerBase classes.

    Anyways, I've been following along with the DatePickerField example in the How To section of sitefinity 4, and have become stuck.

    If I follow the instructions, my DatePickerField header looks like this:
    1.[ControlDesigner(typeof (DatePickerFieldDesigner))]
    3.public class DatePickerField : FieldControl, IFormFieldControl

    I've included my DatePicker project as a reference to my SF project, and have registered the DatePicker control in the backend. But then, when I go to a SF page to add the control, it complains that it can't find "DatePicker.DatePickerField".  So, figuring the instructions were missing a step, I added a namespace quaifler to my DatePickerField, like this:
    1.namespace DatePicker
    3.    [ControlDesigner(typeof (DatePickerFieldDesigner))]
    4.    [DatabaseMapping(UserFriendlyDataType.Date)]
    5.    public class DatePickerField : FieldControl, IFormFieldControl
    6.    {

    Then, I no longer get the "DatePicker.DatePickerField" javascript alert in the backend, but now I get a complaint from that - 
    Assembly 'DatePicker, Version=, Culture=neutral, PublicKeyToken=null' does not contain a Web resource with name 'DatePicker.DatePickerField.js'.

    I've got the DatePickerField.js file marked as an Embedded Resource, so I don't understand why it can't find it.

    Any direction would be awesome.


  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    03 Nov 2014
    08 Nov 2011
    Link to this post
    Hello Francis,

    There is a KB article describing how to create a custom DateTime picker field. Maybe it will be helpful for you -

    Please let us know.

    All the best,
    Lubomir Velkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

2 posts, 0 answered