Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
i am developing application using data grid view in c sharp.

Two fields as follows;
Start week date End week date
(Datepicker) (Datepicker)

for example
Start Week Date End Week date
18th Monday choose in date picker 23rd Saturday.

when i choose the 18th Monday in the end week date 23rd Saturday automatically want to display.

and another condition in the datepicker starting date always to be monday.
Posted 4-Jan-13 22:33pm
(unknown member)
onurag19 at 5-Jan-13 5:30am
you need to search it to google.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Set the start week to the monday.
//This will work on load event of form
dtm_end_week.Value = dtm_start_week.Value.AddDays(6);
//This will work on selecting dtm_start_week .
private void dtm_start_week_MouseEnter(object sender, EventArgs e)
            dtm_end_week.Value = dtm_start_week.Value.AddDays(6);


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 428
1 CHill60 310
2 BillWoodruff 183
3 DamithSL 163
4 OriginalGriff 163

Advertise | Privacy | Mobile
Web03 | 2.8.141022.1 | Last Updated 5 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100