472,352 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

monthCalendar to start with - 1?

Hi!

Anybody that have seen an example of how to have the monthCalendar1
start with yesterdays date?

That is: when the form opens, I'd like to have yesterdays date
selected.

Me.Name

Nov 24 '05 #1
2 1149
Something like this would work:

DateTime yesterday = DateTime.Today.AddDays(-1);
monthCalendar1.SelectionRange = new SelectionRange(yesterday,
yesterday);

Thi

Nov 24 '05 #2
Yes, indeed. Thank you for answering!

Me.Name

Truong Hong Thi skrev:
Something like this would work:

DateTime yesterday = DateTime.Today.AddDays(-1);
monthCalendar1.SelectionRange = new SelectionRange(yesterday,
yesterday);

Thi


Nov 25 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Ty Smith via AccessMonster.com | last post by:
I noticed that the week numbers in Stephan Leban's MonthCalendar are not consistent with Microsoft Outlook (they are shifted one week forward). Is...
3
by: michael_hk | last post by:
Hi, I am new to Windows Form programming and now have a simple Q about MonthCalendar. I want to hightlight some days in the calendar by...
13
by: steven | last post by:
A monthcalendar checks every 2 minutes if theres a new day. Does anyone knows how to disable this ? The problem is that, everytime a...
0
by: steven | last post by:
Start a new project with 2 forms: one with a datagrid, a button and a monthcalendar, and another form without controls. Try this code in your...
8
by: vbmark | last post by:
I want the MonthCalendar control to return the single day selected. I have MaxSelectionCount = 1. What I get back though is this: ...
3
by: DS | last post by:
I seem to have stumbled upon something that I can't explain and was wondering if someone else could maybe help me figure out why this happens. I've...
2
by: meska | last post by:
Hi all, Scenario: I have a MonthCalendar control, and DataGridView. Depending on dates displayed in MonthCalendar I want to update information...
5
by: Randy | last post by:
Based on the date that the user selects, I'm trying to make the MonthCalendar control highlight the entire week. In my case, the week is from...
11
by: Randy | last post by:
I have a MonthCalendar on one of my forms. I have disovered that the DateChanged event is triggered not only when the user clicks on a new date,...
1
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, Is it possible to get a range of dates and to bold it in my monthCalenda? what i mean is, that if for example, i will get the date range...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.