Question about the DatePicker How To In the Sitefinity Documentation - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Question about the DatePicker How To In the Sitefinity Documentation

  • Question about the DatePicker How To In the Sitefinity Documentation
  • Greetings,
    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

    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.


  • 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 >>