The use of the calendar function Calendar in asp.net

  • 2020-05-12 02:28:03
  • OfStack

Today's presentation is about the ajax calendar control provided by Microsoft. This control USES the effects of ajax and sets the events and effects through the foreground js and style. It has rich functions and its own style. It is a necessary control for website design and mis development.

By convention, it's time to post the code:

< asp tutorial :textbox runat="server" id="txtcalendar" width="150" / >
< ajaxtoolkit:calendarextender runat="server" targetcontrolid="txtcalendar" css tutorial class="mycalendar" format=" yyyy-mm-dd "/ >

Since the style is set, let's post the code here as well, and just write a simple style:
 
.mycalendar .ajax__calendar_container{ 
border: 1px solid #646464; 
background-color: maroon; 
color: red; 
} 

When so run, you can discover, ya of incredibly is English, do not have our Chinese, this lets us sentiment how can! What to do? There are solutions, of course, and they are easy to implement. Without further suspense, you can just set enablescriptglobalization and enablescriptlocalization to true.

Let's move on to the properties. targetcontrolid is not the targetcontrolid, format is the way you set the display, and format is the same as the date format in c#. popupbuttonid is the click button control id that pops up.

There are many styles:
.ajax__calendar_container
.ajax__calendar_header
.ajax__calendar_prev
.ajax__calendar_title

web control standard properties
accesskey, attributes, backcolor, bordercolor, borderstyle, borderwidth,
cssclass, enabled, font, enabletheming, forecolor, height, isenabled,
For a complete description of skinid, style, tabindex, tooltip, width, please visit the standard properties of the web control.
Control standard www.3ppt.com quasi property
apprelativetemplatesourcedirectory, bindingcontainer, clientid, controls,
enabletheming, enableviewstate, id, namingcontainer, page, parent, site,
For a complete description of templatecontrol, templatesourcedirectory, uniqueid, visible, visit the standard properties of the control.

attribute

attribute describe .net caption The title of the calendar. 2.0 captionalign Alignment of calendar title text. 2.0 cellpadding The space between the border of the cell and the content, in pixels. 1.0 cellspacing The space between cells, in pixels. 1.0 dayheaderstyle Displays a style for the name of a day in a week. 1.0 daynameformat Displays the name format for each day of the week. 1.0 daystyle Displays the style of the date. 1.0 firstdayofweek Which day is the first day of the week? 1.0 nextmonthtext Displays the text of the next January link. 1.0 nextprevformat The format of the next and previous January links. 1.0 nextprevstyle Displays the styles of the links in the next and previous January. 1.0 othermonthdaystyle Displays a style for a date that is not in the current month. 1.0 prevmonthtext Displays the text of the previous January link. 1.0 runat Specifies that the control is a server control. Must be set to "server". 1.0 selecteddate The date selected. 1.0 selecteddates The date selected. 1.0 selecteddaystyle The style of the selected date. 1.0 selectionmode Allows the user how to select a date. 1.0 selectmonthtext Displays the text of the selected link for the month. 1.0 selectorstyle Select the month and week link style. 1.0 selectweektext Displays the text of the selection link for the week. 1.0 showdayheader Boolean value indicating whether to display headers for each day of the week. 1.0 showgridlines Boolean value that specifies whether to display grid lines between dates. 1.0 shownextprevmonth Boolean value that specifies whether to display the next and previous month links. 1.0 showtitle Boolean value that specifies whether the date of the title is realistic. 1.0 titleformat Format of date headings. 1.0 titlestyle The style of the date header. 1.0 todaydaystyle The date of the day. 1.0 todaysdate Gets or sets the value of today's date. 1.0 useaccessibleheader Specify whether to use < th > To take the place of < td > The element is used for the head of the day. 2.0 visibledate Gets or sets the date of the month specified to be displayed on the calendar control. 1.0 weekenddaystyle Weekend style. 1.0 ondayrender The name of the function to be executed when the cell is created every 1 day. onselectionchanged The name of the function to execute when the user selects a day, week, or month. onvisiblemonthchanged The name of the function to execute when the user navigates to a different month.

Related articles: