DNJ datepicker


Dnj is good frame work . i am trying to use this in my projects . but the problem is that jquery ui support lot off options, but DNJ UI support only few of them. for example i need add " yearRange " option to DNJ date control . is their any way to do that.


AlaaEddine wrote Jun 14, 2010 at 3:15 PM

I agree some options are lacking especially for DatePicker, because this plugin will be completely rewritten by jQuery developpers.

I'll try to add all lacking options in next DNJ release.

Anyway, adding jQuery options to DNJ source is quite easy. I you can't wait for the next release here is how to process.

1 - Download the latest source code http://dnj.codeplex.com/SourceControl/list/changesets#

2 - Open the solution project under trunk/DotNetJQuery directory

3 - Go to DNJ.UI project > DNJSettings > DNJDatePickerSettings.cs

4 - Add the following lines to DNJDatePickerSettings class (you can copy/pas an existing string option and modify it)
    [DefaultValue("c-10:c+10"), NotifyParentProperty(true), RefreshProperties(RefreshProperties.Repaint)]
    public string DateFormat
        get { return Get<String>("yearRange"); }
        set { this["yearRange"] = value; }
5 - Clean the solution, and build the project in the following order : DNJ, DNJ.UI and DNJ.Ext

At this point you should three DLL files in DNJ.Ext/bin directory.

import those file to your project and use them instead of the default ones. You also need to import the web controls again to visual studio toolbar.

to add DNJ webcontrols to visual studio, rightclick the toolbox then click "Add Items" > browse > select the three DLLs > clique OK.

wrote Feb 13, 2013 at 6:56 PM