Good morning guys. I currently have a DateTimePicker on my form with a custom format that goes like this:
Day Year Week
So.. I got the day and year down by using: dd yy
Which is the exact way he wants it. However, now week joins in. The week number is not one of the custom ones because it is.. well.. not normal. It goes something like this:
Code:
January 1st - January 7th = Week 1
January 8th - January 14th = Week 2
January 15th - January 21st = Week 3
January 22nd - January 28 = Week 4
January 29 - February 4th = Week 5
etc.. etc..
Anyways.. That goes on for the entire year.. Now, is there a way to make a new custom format class or void or override void or something or rather to do this? Like.. The function be called w for example and when you type it into the custom format box, it says it? For example:
You're not going to be able to use a DTP. Maybe a MaskedTextBox with some validation on the numbers. There may be a third-party DTP equivalent around that could do it but I don't think the standard one will.
X
A callback field. The control still uses the other valid format characters, and queries the owner to fill in the "X" portion. The owner must be ready to respond to events that request information about how to fill in these fields. Multiple 'X' characters can be used in series to signify unique callback fields.
In the attatched file, I've added a VB6 project and it's VB.NET conversion that does what you need. I hope it woun't be very hard to convert it in C#.
[Edit: Attatchment Updated]
Last edited by iPrank; Apr 12th, 2006 at 11:18 PM.
Fromethius, you have marked the the thread 'resolved'.
If your problem is solved, could you please post the C# code (and the configurations you applied) ?
Thanks !
That's pretty much it.. Also, my friend, Coniptoer recently fiqured out there was code for it developed by Microsoft but it isn't worth carrying around a dll just to do that
Oh, for that I just put a textbox under the DateTimePicker. Works really good too. You wouldn't even notice they are two different controls if you are using the program