Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Date range for "date" custom atrributes
Last Post 05/02/2010 10:29 AM by Peter Donker. 5 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Pete
New Member
New Member
Posts:7


--
04/24/2010 12:38 AM

We have a couple of custom attributes that use the date type/calendar control. The system seems to prevent user from selecting a date past December 31, 2030. Is that something we can change or configure? Is this a bug or by design?

Our users track dates for most of our documents so it very important that we can select dates past 2030.

Thank you

Pete
New Member
New Member
Posts:7


--
04/30/2010 6:15 PM
Sorry to be a bother, but, any ideas on this one?

It's kind of urgent, I've set up a DNN/DMX document management solution for our Legal department and this restriction is a huge deal for them, if they can't store the dates the need to then our DNN/DMX solution won't meet their requirements.

Thanks.
Pete
New Member
New Member
Posts:7


--
04/30/2010 10:01 PM
Looks like the cause is due to not changing the default values for MaxDate and MinDate properties for the ComponentArt.Web.UI.Calendar that is used in the SelectDate.ascx control.

I tested this with our local version of ComponentArt and if you do not set a value for MaxDate it defaults to 12/31/2030.

The SelectDate.ascx control does expose two properties MaxDate and MinDate, which when set, pass the values down to the MaxDate and MinDate properties on the ComponentArt.Web.UI.Calendar, but they are not called in the rest of the code or when a SelectDate control is instantiated.

I'm guessing the plan was to have these configurable by the user when the custom attribute is configured in the global attributes screen, but this hasn't been implemented yet.

Is there any plan to implement this is a near future release?

It would be best for us if this could be at least have them defaulted to the ComponentArt.Web.UI.Calendar.MaxDateTime and ComponentArt.Web.UI.Calendar.MinDateTime for the Max and Min respectively.

Thanks.
Jason Scott
New Member
New Member
Posts:46


--
04/30/2010 11:13 PM
Since I can't speak to the ComponentArt issue that you discovered, I'll at least offer the obvious... is it possible to use a text field for the "date" attribute, then as a matter of procedure require the user to adhere to a mm/dd/yyyy format? We have been able to use a text field as a date field using this procedure. It's obviously not ideal, but works.
Pete
New Member
New Member
Posts:7


--
05/01/2010 12:24 AM
Thanks for you response.

Of course, that is our backup plan in this case, although I'll likely include a custom regular expression in the attribute's definition, to ensure better data integrity. I’ve been working on a rather long RegExp that will capture most invalid dates, though not all, it isn’t perfect. How do you write a RegExp that checks for 31 days in Jan, Mar, etc.. and for leap years days in Feb?

“As a matter of procedure” doesn’t really hold up in terms of solid data integrity, users will always make mistakes or neglect to follow proper procedures, which is why I like to avoid all possibilities for improper data entry.

Using the calendar control is ideal for data integrity, so I would hope that eventually this could be fixed. Since the ComponentArt calendar control being used in DMX supports dates up to 12/31/9998 I don’t see that as being an issue long term.

We were hoping to write some custom SQL code to query these dates and provide reports to users when a certain threshold was met, kind of like an expiry date or renewal date for the document, though obviously the dates past 2030 won’t come into play for some time. Because of this I’ll have to write some additional SQL code to validate that these values conform to proper dates.

I certainly do hope there is a plan to add the MaxDate and MinDate as properties of the date type custom atrribute, so we can one day use the calendar, as it is a very slick feature, and works quite well to sell the DMX system to users.

The real unfortunate matter is I had already “sold” the system to our internal client, our Legal department, as having this calendar functionality, so it means I’m coming up short on a commitment to them. Though I understand it’s my responsibility to confirm all requirements, I wrongfully assumed this calendar control would handle a large range of dates, though testing for dates past 2030 seems as absurd as testing if the string control could store the “p” character.

In either case, adding the following lines to the Page_Init(), Page_Load(), or New() functions within the file Controls\SelectDate.asc.vb will provide a workaround for the situation and allow for a wider range of dates to be used. If something like this could be include in the next release, we would be very grateful.

MaxDate = ComponentArt.Web.UI.Calendar.MaxDateTime
MinDate = ComponentArt.Web.UI.Calendar.MinDateTime

Thanks again! 
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
05/02/2010 10:29 AM
Hi Peter,

I'll make a note and if I can reproduce this I'll fix it in the next version. Note there is a tracking panel next to this thread on the page where you can see progress.

Peter
You are not authorized to post a reply.