When the calendar control provided in the WPF toolkit (and included in .Net 4) is displayed in "month view", it displays days from the previous and the next month, filling up the entire calendar. When you click on a day of the previous or next month, it will scroll a month backwards or forwards automatically. This behavior is throwing my users off.
Is there any way to prevent this automatic scrolling from happening?
Thanks!
If you set the DisplayDateStart property to the first day of the month and the DisplayDateEnd property to the last day of the month, those days from other months are not show, and hence cannot be clicked on.
If you can do it in xaml, it would look like this:
<my:Calendar Margin="50,49,48,43" Name="calendar1" SelectionMode="MultipleRange"
DisplayMode="Month" DisplayDateStart="2009-08-01" DisplayDateEnd="2009-08-31"/>
But that would only work if you knew that dates at design time. So you would probably want to set the dates in the code.
calendar1.DisplayDateStart = new DateTime(2009, 08, 01);
calendar1.DisplayDateEnd = new DateTime(2009, 08, 31);
Of coarse you would need to provide the first and last day of the particular month.
Related
I am using Big Calendar (https://github.com/jquense/react-big-calendar) in my react application, and I have problem to show only half of day for event in month view in Big Calendar component.
For example:
Event starts on 06.04.2021 at 12:00, and ends on 09.04.2021 at 12:00
Default behaviour:
Output should looks like this:
PS: In this scenario, it is easy just move it by CSS combination of position relative and right/left property. Complications occurs when event cover more weeks like this:
Any help?
Thanks.
At the time of writing this is not possible in any version of fullCalendar (or derivatives such as react big calendar). The "month" view has no concept of any time period shorter than a day.
I've tried implementing the first suggestion from C# Winforms DataGridView Time Column, i.e. showing a DateTime picker in a DataGridView.
However, when I launch the app and select a date from the dtPicker and then select the next row, the value disappears in the first cell where I had selected a date.
What changes are needed for the cell to keep displaying its value while creating additional rows in the DataGridView?
I found another solution, which solved the issue. It's much cleaner and easier to implement. The solution was in an article titled:
Embedding Calendar (DateTimePicker) Control Into DataGridView Cell
https://www.c-sharpcorner.com/UploadFile/0f68f2/embedding-calendar-datetimepicker-control-into-datagridvie586/
The code suggestions in the above article work well for every row in the DGV.
I have infragistics XamDateTimeInput control. I want to prevent users to select some configured dates or past dates(Disable the dates). Here is the example which i found in a train booking site. They disabled the past dates.
Thanks.
I don't have the Infragistics control to test this, but from studying the XamDateTimeInput doc and the ValueConstraint doc, you should be able to set a min and max date by:
<XamDateTimeInput ...>
<XamDateTimeInput.ValueConstraint>
<ValueConstraint MinInclusive="Your min date" MaxInclusive="Your max date"/>
</XamDateTimeInput.ValueConstraint>
</XamDateTimeInput>
I can't find a way to block a specific date range though. However, a few weeks ago I stumbled across this article on CodeProject, where the author has modified a regular WPF DatePicker. His solution also includes support for Blackout Dates:
CodeProject: A couple of tricks when using the standard WPF .NET 4.0 DatePicker control
You may use this post to modify your Infragistics XamDateTimeInput control. I can't test or provide an example here, as like I said, I haven't purchased their controls.
I´m working with the Agenda-Tool and want to set it to one fixed Week, because I just want to use it as a Timetable for a School and they want to work with the same schedule each Week. I know that it is using the util.Calendar, but i can't find a Way to set it fixed. Thanks in Advance!
Agenda has a displayedCalendar property which is used to specify what is to be shown. In week skin it will display the week where the calendar is part of, in day skin it will show the single day (and if there will be a month view...
When I used my Apple Magic Mouse to select a date on a date field (either Ext JS 3.x or 4.x), it often starts scrolling months very rapidly and sort-of out of control. I think it might be due to the multi-touch sensitivity. It can happen even if I'm not trying to change the month but just select a date in current month. Is there a way to keep the mouse under control using javascript, or do I just need to learn how to use the mouse better?