Click here to Skip to main content
12,757,627 members (37,285 online)
Rate this:
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 23:33pm
onurag19 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170217.1 | Last Updated 5 Jan 2013
Copyright © CodeProject, 1999-2017
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