CalendarDayとは? わかりやすく解説

CalendarDay クラス

Calendar コントロール日付表します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

public class CalendarDay
public ref class CalendarDay
public class CalendarDay
public class CalendarDay
解説解説
使用例使用例

CalendarDay オブジェクトプロパティ使用してDayRender イベント表示される日付表示され月内日付であり、土曜日日曜日でないことを確認する方法次の例に示します。これらの日付黄色表示されます。DayRender イベント ハンドラ渡される DayRenderEventArgs オブジェクトDay プロパティは、CalendarDay オブジェクトです。

<%@ Page Language="VB" AutoEventWireup="True"
 %>

<html>
<head>

   <script language="VB" runat="server">
        Sub DayRender(source As Object,
 e As DayRenderEventArgs)
            
            If Not e.Day.IsOtherMonth And
 Not e.Day.IsWeekend Then
                e.Cell.BackColor = System.Drawing.Color.Yellow
            End If 
        End Sub 'DayRender
   </script>
 
</head>
 
<body>
 
   <form runat="server">
 
      <asp:Calendar id="calendar1" runat="server"
           WeekendDayStyle-BackColor="gray"
           OnDayRender="DayRender"/>
                   
   </form>
         
</body>
</html>
   
<%@ Page Language="C#" AutoEventWireup="True" %>

<html>
<head>

   <script language="C#" runat="server">

      void DayRender(Object source, DayRenderEventArgs e) 
      {
      
         if (!e.Day.IsOtherMonth && !e.Day.IsWeekend)
            e.Cell.BackColor=System.Drawing.Color.Yellow;
      
      }

   </script>
 
</head>
 
<body>
 
   <form runat="server">
 
      <asp:Calendar id="calendar1" runat="server"
           WeekendDayStyle-BackColor="gray"
           OnDayRender="DayRender"/>
                   
   </form>
         
</body>
</html>
   
<%@ Page Language="JScript" AutoEventWireup="True" %>

<html>
<head>

   <script language="JScript" runat="server">

      function DayRender(source : Object, e : DayRenderEventArgs)
 
      {
      
         if (!e.Day.IsOtherMonth && !e.Day.IsWeekend)
            e.Cell.BackColor=System.Drawing.Color.Yellow;
      
      }

   </script>
 
</head>
 
<body>
 
   <form runat="server">
 
      <asp:Calendar id="calendar1" runat="server"
           WeekendDayStyle-BackColor="gray"
           OnDayRender="DayRender"/>
                   
   </form>
         
</body>
</html>
   
<%@ Page Language="VB" AutoEventWireup="True"
 %>
<html>
<head>

   <script runat="server">
   
      Sub DayRender(sender as Object,
 e As DayRenderEventArgs) 

         ' Change the background color of the days in the month
         ' to yellow.
         If (Not e.Day.IsOtherMonth) And
 (Not e.Day.IsWeekend) Then
        
            e.Cell.BackColor=System.Drawing.Color.Yellow
         
         End If

         ' Add custom text to cell in the Calendar control.
         If e.Day.Date.Day = 18 Then
         
            e.Cell.Controls.Add(New LiteralControl("<br>Holiday"))
         
         End If

      End Sub

      Sub Page_Load(sender As Object,
 e As EventArgs)

         ' Manually register the event-handling method for the DayRender
  
         ' event of the Calendar control.
         AddHandler Calendar1.DayRender, AddressOf
 DayRender

      End Sub

   </script>
 
</head>
 
<body>
 
   <form runat="server">

      <h3>Calendar DayRender Example</h3>
 
      <asp:Calendar id="Calendar1" 
                    runat="server">

         <WeekendDayStyle BackColor="gray">
         </WeekendDayStyle>

      </asp:Calendar>
                   
   </form>
          
</body>
</html>
   
<%@ Page Language="C#" AutoEventWireup="True" %>
<html>
<head>

   <script runat="server">
   
      void DayRender(Object sender, DayRenderEventArgs e) 
      {

         // Change the background color of the days in the month
         // to yellow.
         if (!e.Day.IsOtherMonth && !e.Day.IsWeekend)
         {
            e.Cell.BackColor=System.Drawing.Color.Yellow;
         }

         // Add custom text to cell in the Calendar control.
         if (e.Day.Date.Day == 18)
         {
            e.Cell.Controls.Add(new LiteralControl("<br>Holiday"));
         }

      }

      void Page_Load(Object sender, EventArgs e)
      {

         // Manually register the event-handling method for the DayRender
  
         // event of the Calendar control.
         Calendar1.DayRender += new DayRenderEventHandler(this.DayRender);

      }

   </script>
 
</head>
 
<body>
 
   <form runat="server">

      <h3>Calendar DayRender Example</h3>
 
      <asp:Calendar id="Calendar1" 
                    runat="server">

         <WeekendDayStyle BackColor="gray">
         </WeekendDayStyle>

      </asp:Calendar>
                   
   </form>
          
</body>
</html>
   
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
  System.Web.UI.WebControls.CalendarDay
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

CalendarDay コンストラクタ

CalendarDay クラス新しインスタンス初期化します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    date As DateTime, _
    isWeekend As Boolean, _
    isToday As Boolean, _
    isSelected As Boolean, _
    isOtherMonth As Boolean, _
    dayNumberText As String _
)
Dim date As DateTime
Dim isWeekend As Boolean
Dim isToday As Boolean
Dim isSelected As Boolean
Dim isOtherMonth As Boolean
Dim dayNumberText As String

Dim instance As New CalendarDay(date,
 isWeekend, isToday, isSelected, isOtherMonth, dayNumberText)
public CalendarDay (
    DateTime date,
    bool isWeekend,
    bool isToday,
    bool isSelected,
    bool isOtherMonth,
    string dayNumberText
)
public:
CalendarDay (
    DateTime date, 
    bool isWeekend, 
    bool isToday, 
    bool isSelected, 
    bool isOtherMonth, 
    String^ dayNumberText
)
public CalendarDay (
    DateTime date, 
    boolean isWeekend, 
    boolean isToday, 
    boolean isSelected, 
    boolean isOtherMonth, 
    String dayNumberText
)
public function CalendarDay (
    date : DateTime, 
    isWeekend : boolean, 
    isToday : boolean, 
    isSelected : boolean, 
    isOtherMonth : boolean, 
    dayNumberText : String
)

パラメータ

date

このクラスインスタンス表される日付格納する System.DateTime オブジェクト

isWeekend

このクラスインスタンス表される日付土曜日日曜日である場合trueそれ以外場合false

isToday

このクラスインスタンス表される日付現在の日付である場合trueそれ以外場合false

isSelected

このクラスインスタンス表される日付Calendar コントロール選択され日付である場合trueそれ以外場合false

isOtherMonth

このクラスインスタンス表される日付Calendar コントロール表示された月以外の月の日付である場合trueそれ以外場合false

dayNumberText

このクラス表される日付日付数字

解説解説

このコンストラクタ使用してCalendarDay クラス新しインスタンス作成し初期化します。

メモメモ

このコンストラクタ使用できますが、CalendarDay クラスインスタンスは、通常動的に作成されません。

CalendarDayインスタンス初期プロパティ値を次の表に示します

プロパティ

初期値

日付

date パラメータの値。

DayNumberText

dayNumberText パラメータの値。

IsOtherMonth

isOtherMonth パラメータの値。

IsSelected

isSelected パラメータの値。

IsToday

isToday パラメータの値。

IsWeekend

isWeekEnd パラメータの値。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

CalendarDay プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

CalendarDay クラス
System.Web.UI.WebControls 名前空間
Calendar クラス
Calendar.DayRender イベント
DayRenderEventArgs
Day

その他の技術情報

Calendar Web サーバー コントロール

CalendarDay メソッド


CalendarDay メンバ

Calendar コントロール日付表します

CalendarDay データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド CalendarDay CalendarDay クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

CalendarDay クラス
System.Web.UI.WebControls 名前空間
Calendar クラス
Calendar.DayRender イベント
DayRenderEventArgs
Day

その他の技術情報

Calendar Web サーバー コントロール

「calendar day」の例文・使い方・用例・文例

Weblio日本語例文用例辞書はプログラムで機械的に例文を生成しているため、不適切な項目が含まれていることもあります。ご了承くださいませ。


英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「CalendarDay」の関連用語

CalendarDayのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



CalendarDayのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.
Tanaka Corpusのコンテンツは、特に明示されている場合を除いて、次のライセンスに従います:
 Creative Commons Attribution (CC-BY) 2.0 France.
この対訳データはCreative Commons Attribution 3.0 Unportedでライセンスされています。
浜島書店 Catch a Wave
Copyright © 1995-2025 Hamajima Shoten, Publishers. All rights reserved.
株式会社ベネッセコーポレーション株式会社ベネッセコーポレーション
Copyright © Benesse Holdings, Inc. All rights reserved.
研究社研究社
Copyright (c) 1995-2025 Kenkyusha Co., Ltd. All rights reserved.
日本語WordNet日本語WordNet
日本語ワードネット1.1版 (C) 情報通信研究機構, 2009-2010 License All rights reserved.
WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved. License
日外アソシエーツ株式会社日外アソシエーツ株式会社
Copyright (C) 1994- Nichigai Associates, Inc., All rights reserved.
「斎藤和英大辞典」斎藤秀三郎著、日外アソシエーツ辞書編集部編
EDRDGEDRDG
This page uses the JMdict dictionary files. These files are the property of the Electronic Dictionary Research and Development Group, and are used in conformance with the Group's licence.

©2025 GRAS Group, Inc.RSS