|
Rank: Newbie Groups: Member
Joined: 3/7/2010 Posts: 7
|
hello my title of month is show only in hebrew alwyas what to do?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Please post your DatePicker definition.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 3/7/2010 Posts: 7
|
hi there is the code in my control:
Code: C#
protected override void CreateChildControls()
{
base.CreateChildControls();
_dateFieldData = new DateFieldData(FieldID);
castValidator.ID = "castV";
castValidator.Text = Resources.LocalStrings.RequiredValidatorText;
castValidator.ServerValidate += new ServerValidateEventHandler(castValidator_ServerValidate);
castValidator.Display = ValidatorDisplay.Dynamic;
Controls.Add(castValidator);
_calendarEo = new EO.Web.DatePicker();
_calendarEo.ID = "calendarEo";
_calendarEo.AllowMultiSelect = false;
_calendarEo.MonthSelectorVisible = false;
_calendarEo.DayCellHeight = 20;
_calendarEo.DayCellWidth = 30;
_calendarEo.WeekSelectorVisible = false;
_calendarEo.DayHeaderFormat = DayNameFormat.Short;
if (_dateFieldData.DateWithTitle == true && _dateFieldData.DisablePopUpButton == false)
{
_calendarEo.TitleTemplate = new ClientTemplate();
_calendarEo.TitleTemplate.Text = "<center>{var:visible_date:MMMM}" +
"<a id=\"{var:clientId}_month\" href=\"javascript:ShowMonthPopup('{var:clientId}', '{var:clientId}_month')\">" +
" <img src=\"{img:00020012}\" border='0' /></a>" +
"{var:visible_date:yyyy}<a id=\"{var:clientId}_year\" href=\"javascript:ShowYearPopup('{var:clientId}', '{var:clientId}_year')\">" +
"<img src=\"{img:00020012}\" border='0' /></a></center>";
_calendarEo.DayHeaderFormat = DayNameFormat.Short;
_calendarEo.TitleFormat = "MMMM, yyyy";
_calendarEo.TitleLeftArrowImageUrl = "DefaultSubMenuIconRTL";
_calendarEo.OtherMonthDayVisible = true;
_calendarEo.TitleRightArrowImageUrl = "DefaultSubMenuIcon";
_calendarEo.TitleTemplateScope = CalendarTitleTemplateScope.TextOnly;
}
else
if (Language.IsRightToLeft)
{
_calendarEo.TitleLeftArrowImageUrl = "00040204";
_calendarEo.TitleRightArrowImageUrl = "00040206";
_calendarEo.TitleLeftArrowHoverImageUrl = "00040205";
_calendarEo.TitleRightArrowHoverImageUrl = "00040207";
_calendarEo.TitleLeftArrowDownImageUrl = "00040205";
_calendarEo.TitleRightArrowDownImageUrl = "00040207";
}
else
{
_calendarEo.TitleLeftArrowImageUrl = "00040206";
_calendarEo.TitleRightArrowImageUrl = "00040204";
_calendarEo.TitleLeftArrowHoverImageUrl = "00040207";
_calendarEo.TitleRightArrowHoverImageUrl = "00040205";
_calendarEo.TitleLeftArrowDownImageUrl = "00040207";
_calendarEo.TitleRightArrowDownImageUrl = "00040205";
}
EO.Web.ClientTemplate a = new EO.Web.ClientTemplate();
HtmlImage img = new HtmlImage();
img.Src = "{img:00040106}";
a.Controls.Add(img);
_calendarEo.FooterTemplate = a;
_calendarEo.DayStyle.CssText = "text-decoration:none";
_calendarEo.DayHoverStyle.CssText = "background-image:url('00040208');";
_calendarEo.DisabledDayStyle.CssText = "COLOR: gray";
_calendarEo.DayHeaderStyle.CssText = "FONT-SIZE: 11px; COLOR: #0054e3; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Tahoma";
_calendarEo.SelectedDayStyle.CssText = "background-image:url('00040208');";
_calendarEo.MonthStyle.CssText = "FONT-SIZE: 8pt; MARGIN: 0px 4px; FONT-FAMILY: Tahoma; cursor:hand";
_calendarEo.TitleStyle.CssText = "PADDING-RIGHT: 3px; PADDING-LEFT: 3px; FONT-WEIGHT: bold; FONT-SIZE: 8pt; PADDING-BOTTOM: 3px; COLOR: white; PADDING-TOP: 3px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #0054e3";
_calendarEo.CalendarStyle.CssText = "border-bottom-color:Black;border-bottom-style:solid;border-bottom-width:1px;border-left-color:Black;border-left-style:solid;border-left-width:1px;border-right-color:Black;border-right-style:solid;border-right-width:1px;border-top-color:Black;border-top-style:solid;border-top-width:1px;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;background-color:white";
_calendarEo.TodayStyle.CssText = "background-image:url('00040106');";
_calendarEo.PopupHoverImageUrl = "00040211";
_calendarEo.PopupImageUrl = "00040209";
_calendarEo.PopupDownImageUrl = "00040210";
_calendarEo.PopupImageVisible = !_dateFieldData.DisablePopUpButton;
_calendarEo.PickerHint = "";
_calendarEo.PickerFormat = "dd/MM/yyyy";
if (_dateFieldData.FieldID > 0 && _dateFieldData.AddTime == true)
_calendarEo.PickerFormat += " hh:mm tt";
_calendarEo.DayRender += new EO.Web.DayRenderEventHandler(_calendar_DayRender);
Controls.Add(_calendarEo);
if (_dateFieldData.DateWithTitle == true && _dateFieldData.DisablePopUpButton == false)
{
createMonthMenu();
createYearMenu();
}
}
private void LoadMenuMonths(ref EO.Web.ContextMenu cmMnuMonth)
{
try
{
//Add the below code in page_load event
string[] months = new string[12];
months[0] = "January";
months[1] = "February";
months[2] = "March";
months[3] = "April";
months[4] = "May";
months[5] = "June";
months[6] = "July";
months[7] = "August";
months[8] = "September";
months[9] = "October";
months[10] = "November";
months[11] = "December";
if (cmMnuMonth != null)
{
cmMnuMonth.Items.Clear();
}
foreach (string month in months)
{
EO.Web.MenuItem item = new EO.Web.MenuItem();
item.Text.Html = month;
cmMnuMonth.Items.Add(item);
}
}
catch (Exception e)
{
}
}
private void createMonthMenu()
{
_mnuMonth = new ContextMenu();
_mnuMonth.ID = "mnuMonth";
_mnuMonth.ControlSkinID = "None";
_mnuMonth.Style.Add(HtmlTextWriterStyle.Width, "80");
_mnuMonth.ClientSideOnItemClick = "MonthMenuClicked";
_mnuMonth.TopGroup.Style.CssText = "border-left-color:#e0e0e0;border-left-style:solid;border-left-width:1px;border-right-color:#e0e0e0;" +
"border-right-style:solid;border-right-width:1px;border-top-color:#e0e0e0;border-top-style:solid;border-top-width:1px;" +
"cursor:hand;font-family:arial;font-size:12px;padding-bottom:3px;padding-left:10px;padding-right:10px;padding-top:3px;";
_mnuMonth.TopGroup.OffsetX = 80;
_mnuMonth.TopGroup.OffsetY = -100;
LoadMenuMonths(ref _mnuMonth);
EO.Web.MenuItem mnuMonth = new EO.Web.MenuItem();
mnuMonth.HoverStyle.CssText = "color:#1C7CDC;padding-left:5px;padding-right:5px;";
mnuMonth.ItemID = "_Default";
mnuMonth.NormalStyle.CssText = "color:#2C0B1E;padding-left:5px;padding-right:5px;";
mnuMonth.SubMenu.Style.CssText = "background-color:White;border-bottom-color:#e0e0e0;border-bottom-style:solid;border-bottom-width:1px;" +
"border-left-color:#e0e0e0;border-left-style:solid;border-left-width:1px;border-right-color:#e0e0e0;" +
"border-right-style:solid;border-right-width:1px;border-top-color:#e0e0e0;border-top-style:solid;border-top-width:1px;" +
"color:#606060;cursor:hand;font-family:arial;font-size:12px;padding-bottom:3px;padding-left:3px;padding-right:3px;" +
"padding-top:3px;";
mnuMonth.SubMenu.ShadowDepth = 0;
mnuMonth.SubMenu.ItemSpacing = 5;
_mnuMonth.LookItems.Add(mnuMonth);
Controls.Add(_mnuMonth);
}
int MinValidYear;
int MaxValidYear;
private void createYearMenu()
{
_mnuYear = new ContextMenu();
_mnuYear.ID = "mnuYear";
_mnuYear.ControlSkinID = "None";
_mnuYear.Style.Add(HtmlTextWriterStyle.Width, "80px");
_mnuYear.ClientSideOnItemClick = "YearMenuClicked";
_mnuYear.EnableScrolling = true;
_mnuYear.ScrollUpLookID = "scroll_up" + _calendarEo.ID;
_mnuYear.ScrollDownLookID = "scroll_down" + _calendarEo.ID;
_mnuYear.TopGroup.Style.CssText = "border-left-color:#e0e0e0;border-left-style:solid;border-left-width:1px;border-right-color:#e0e0e0;" +
"border-right-style:solid;border-right-width:1px;border-top-color:#e0e0e0;border-top-style:solid;border-top-width:1px;" +
"cursor:hand;font-family:arial;font-size:12px;padding-bottom:3px;padding-left:10px;padding-right:10px;padding-top:3px;";
_mnuYear.TopGroup.OffsetX = 80;
_mnuYear.TopGroup.Height = 150;
_mnuYear.TopGroup.OffsetY = -50;
MinValidYear = (_dateFieldData.MinDate > DateTime.MinValue) ? _dateFieldData.MinDate.Year : 1980;// MinValidDate.Year;
MaxValidYear = (_dateFieldData.MaxDate > DateTime.MinValue) ? _dateFieldData.MaxDate.Year : DateTime.Now.Year;
EO.Web.MenuItem mnuYear = new EO.Web.MenuItem();
mnuYear.HoverStyle.CssText = "color:#1C7CDC;padding-left:5px;padding-right:5px;";
mnuYear.ItemID = "_Default";
mnuYear.NormalStyle.CssText = "color:#2C0B1E;padding-left:5px;padding-right:5px;";
mnuYear.SubMenu.Style.CssText = "background-color:White;border-bottom-color:#e0e0e0;border-bottom-style:solid;border-bottom-width:1px;" +
"border-left-color:#e0e0e0;border-left-style:solid;border-left-width:1px;border-right-color:#e0e0e0;" +
"border-right-style:solid;border-right-width:1px;border-top-color:#e0e0e0;border-top-style:solid;border-top-width:1px;" +
"color:#606060;cursor:hand;font-family:arial;font-size:12px;padding-bottom:3px;padding-left:3px;padding-right:3px;" +
"padding-top:3px;";
mnuYear.SubMenu.ShadowDepth = 0;
mnuYear.SubMenu.ItemSpacing = 5;
EO.Web.MenuItem mnuYearScrollDown = new EO.Web.MenuItem();
mnuYearScrollDown.Height = 14;
mnuYearScrollDown.ItemID = "scroll_down";
mnuYearScrollDown.NormalStyle.CssText = "background-image:url('00020005');border-bottom-color:#E0E0E0;border-bottom-style:solid;border-bottom-width:1px;" +
"border-left-color:#E0E0E0;border-left-style:solid;border-left-width:1px;border-right-color:#E0E0E0;" +
"border-right-style:solid;border-right-width:1px;border-top-color:#E0E0E0;border-top-style:solid;border-top-width:1px;";
mnuYearScrollDown.Image.Url = "00020001";
EO.Web.MenuItem mnuYearScrollUp = new EO.Web.MenuItem();
mnuYearScrollUp.Height = 14;
mnuYearScrollUp.ItemID = "scroll_up";
mnuYearScrollUp.NormalStyle.CssText = "background-image:url('00020005');border-bottom-color:#E0E0E0;border-bottom-style:solid;" +
"border-bottom-width:1px;border-left-color:#E0E0E0;border-left-style:solid;border-left-width:1px;" +
"border-right-color:#E0E0E0;border-right-style:solid;border-right-width:1px;border-top-color:#E0E0E0;" +
"border-top-style:solid;border-top-width:1px;";
mnuYearScrollUp.Image.Url = "00020000";
for (int i = MinValidYear; i <= MaxValidYear; i++)
{
EO.Web.MenuItem item = new EO.Web.MenuItem();
item.Text.Html = i.ToString();
_mnuYear.Items.Add(item);
}
_mnuYear.LookItems.Add(mnuYear);
_mnuYear.LookItems.Add(mnuYearScrollDown);
_mnuYear.LookItems.Add(mnuYearScrollUp);
Controls.Add(_mnuYear);
}
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Please check your page's UICulture setting. DatePicker uses your page's UICulture to determine which language it should use. If you do not wish to change UICulture, you can explicitly set MonthNames, AbbreviatedMonthNames, DayNames and AbbreviatedDayNames on the DatePicker control: http://doc.essentialobjects.com/library/1/calendar/localization.aspxThanks
|
|
Rank: Newbie Groups: Member
Joined: 3/7/2010 Posts: 7
|
thanks thats the answer
|
|