iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have a WebInput that I am using to allow the user to specify a Date object. I am using the WebInput's CultureInfo.CultureName to specify the culture:
this.wiTransHeaderSettlementDue.CultureInfo.CultureName = "en-GB";
How do you set the WebInput to show the Date data based on the specified culture both on the server-side and the culture side? For the server-side, the WebInput's Value property seems to work assuming you provide a .NET DateTime object instead of in string representation:
For example, the following shows "06-Dec-2010"
this.wiTransHeaderSettlementDue.Value = DateTime.Now
where as the following shows "12-Jun-2010" which is incorrect (Therefore, the .NET DateTime object should be used instead of this):
this.wiTransHeaderSettlementDue.Value = DateTime.Now.ToString()
However, how is this done on the JavaScript? When the same approach is made on the client-side, the incorrect "12-Jun-2010" is displayed which is incorrect. How do you fix this?
wiTransHeaderSettlementDue.SetValueData(new Date());
<ISWebInput:WebInput runat="server" ID="wiTransHeaderSettlementDue" Width="100px" CausesValidation="false"> <EditFormat> <ErrorWindowStyle ForeColor="Red"></ErrorWindowStyle> </EditFormat> <FrameStyle> <Normal BackColor="White" BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" Height="100%"></Normal> <Over BackColor="WhiteSmoke" BaseStyle="Normal" BorderColor="MidnightBlue" BorderStyle="Solid" BorderWidth="1px"></Over> <Active BackColor="White" BaseStyle="Over"></Active> </FrameStyle> <DateTimeEditor IsEnabled="True"> <DateTimeStyle BorderColor="MidnightBlue" BorderStyle="Solid" BorderWidth="1px" Height="140px" Width="200px"></DateTimeStyle> <DayStyle> <Normal Cursor="Hand" Font-Names="Arial" Font-Size="10px"></Normal> <Over BackColor="DarkOrange" BaseStyle="Normal" Cursor="Hand" Font-Names="Arial" Font-Size="10px"></Over> <Active BackColor="RoyalBlue" BaseStyle="Over" Cursor="Hand" Font-Names="Arial" Font-Size="10px"></Active> </DayStyle> <OtherMonthDayStyle Cursor="Hand" Font-Names="Arial" Font-Size="10px" ForeColor="Silver" /> <HeaderDayStyle Font-Bold="True" Font-Names="Arial" Font-Size="11px"></HeaderDayStyle> <HighLightMonthYearStyle BackColor="Gainsboro" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Font-Bold="True"></HighLightMonthYearStyle> <DropDownMonthYearTextStyle Cursor="Hand" Font-Names="Arial" Font-Size="10px"></DropDownMonthYearTextStyle> <DropDownMonthYearHighLightTextStyle BackColor="WhiteSmoke" Cursor="Hand" Font-Names="Arial" Font-Size="10px"></DropDownMonthYearHighLightTextStyle> <DropDownMonthYearUpDownButtonStyle BackColor="#FFD294" Cursor="Hand" Font-Names="Arial" Font-Size="10px"></DropDownMonthYearUpDownButtonStyle> <HeaderStyle BackColor="DarkOrange" BackColor2="255, 210, 148" Font-Bold="True" Font-Names="Arial" Font-Size="10pt" GradientType="Vertical" Height="24px" /> <FooterStyle BackColor="#FFF2C8" Font-Bold="True" Font-Names="Arial" Font-Size="11px" Height="20px" /> <DayOffStyle Font-Bold="True" Font-Names="Arial" Font-Size="11px" ForeColor="Red" Height="20px"></DayOffStyle> <HolidayStyle BackColor="WhiteSmoke" Font-Bold="True" Font-Names="Arial" Font-Size="11px" ForeColor="Red" Height="20px"></HolidayStyle> <WindowInfo DisplayType="Normal"></WindowInfo> </DateTimeEditor> <CultureInfo CultureName="en-US"></CultureInfo> <DisplayFormat Format="dd-MMM-yyyy" IsEnabled="True" /> <DropDownStyle> <Normal Cursor="Hand" CssClass="WebInputDropDownStyleNormal"></Normal> <Over BaseStyle="Normal" Cursor="Hand" CssClass="WebInputDropDownStyleOver"></Over> <Active BaseStyle="Normal"></Active> </DropDownStyle> <CalculatorEditor> <CalculatorStyle BackColor="DarkOrange" BackColor2="255, 210, 148" BorderColor="MidnightBlue" BorderStyle="Solid" BorderWidth="1px" Font-Names="Arial" Font-Size="12px" ForeColor="MidnightBlue" GradientType="Vertical" Height="150px" Overflow="Hidden" OverflowX="Hidden" OverflowY="Hidden" Width="150px"> </CalculatorStyle> <OperandStyle> <Normal BackColor="#FFD294" BorderColor="White" BorderStyle="Solid" BorderWidth="1px" Cursor="Hand"> </Normal> <Over BackColor="White" BackColor2="255, 210, 148" BaseStyle="Normal" Cursor="Hand" GradientType="Vertical"> </Over> <Active BackColor="DarkOrange" BackColor2="255, 210, 148" BaseStyle="Over" Cursor="Hand"> </Active> </OperandStyle> <OperatorStyle> <Normal BackColor="#FFD294" BorderColor="White" BorderStyle="Solid" BorderWidth="1px" Cursor="Hand"> </Normal> <Over BackColor="White" BackColor2="255, 210, 148" BaseStyle="Normal" Cursor="Hand" GradientType="Vertical"> </Over> <Active BackColor="DarkOrange" BackColor2="255, 210, 148" BaseStyle="Over" Cursor="Hand"> </Active> </OperatorStyle> <WindowInfo DisplayType="Normal"> </WindowInfo> </CalculatorEditor> </ISWebInput:WebInput>
Using the latest WebInput 4, I could not replicate the issue you mention. The javascript snippet you provide will correctly displayed "07-Dec-2010" in en-GB culture.
The latest WebInput 4 and WebUI Framework 3 build is 7 and 756 respectively. In order to check the latest release build please navigate to Intersoft Support Page.
Using the latest WebInput 4, I could not replicate the issue you mention. The javascript snippet you provide will correctly displayed "07-Dec-2010" in en-GB culture.The latest WebInput 4 and WebUI Framework 3 build is 7 and 756 respectively. In order to check the latest release build please navigate to Intersoft Support Page.
I am using WebInput Version 3.0.7200.216. I will update to the latest WebInput version and re-test in the next couple of days. I will post my findings to help others.
EDIT: I just confirmed that the latest version 4.0.7200.7 fixes this bug. Fantastic. Thank you.
Thank you!
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname