﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebInput - How to set the WebInput to show Date data based on the specified culture?</title><link>http://www.intersoftsolutions.com/Community/WebInput/WebInputs-not-displaying-date-properly-when-specifying-different-culture/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>How to set the WebInput to show Date data based on the specified culture?</title><link>http://www.intersoftsolutions.com/Community/WebInput/WebInputs-not-displaying-date-properly-when-specifying-different-culture/</link><pubDate>Wed, 08 Dec 2010 09:32:18 GMT</pubDate><dc:creator>SAgosto</dc:creator><description>&lt;blockquote&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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 &lt;a href="http://www.intersoftpt.com/Support/" target="_blank"&gt;Intersoft Support Page&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt; EDIT: I just confirmed that the latest version 4.0.7200.7 fixes this bug. Fantastic. Thank you.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;</description></item><item><title>How to set the WebInput to show Date data based on the specified culture?</title><link>http://www.intersoftsolutions.com/Community/WebInput/WebInputs-not-displaying-date-properly-when-specifying-different-culture/</link><pubDate>Tue, 07 Dec 2010 23:09:37 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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 &lt;a target="_blank" href="../../../Support/"&gt;Intersoft Support Page&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How to set the WebInput to show Date data based on the specified culture?</title><link>http://www.intersoftsolutions.com/Community/WebInput/WebInputs-not-displaying-date-properly-when-specifying-different-culture/</link><pubDate>Mon, 06 Dec 2010 14:24:00 GMT</pubDate><dc:creator>SAgosto</dc:creator><description>&lt;p&gt;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:&lt;/p&gt;&lt;pre&gt;this.wiTransHeaderSettlementDue.CultureInfo.CultureName = "en-GB";&lt;/pre&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;p&gt;For example, the following shows "06-Dec-2010"&lt;/p&gt;&lt;pre&gt;this.wiTransHeaderSettlementDue.Value = DateTime.Now&lt;/pre&gt;
&lt;p&gt;where as the following shows "12-Jun-2010" which is incorrect (Therefore, the .NET DateTime object should be used instead of this): &lt;/p&gt;&lt;pre&gt;this.wiTransHeaderSettlementDue.Value = DateTime.Now.ToString()&lt;/pre&gt;
&lt;p&gt;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?&lt;/p&gt;&lt;pre&gt;wiTransHeaderSettlementDue.SetValueData(new Date());&lt;/pre&gt;&lt;pre&gt;&amp;lt;ISWebInput:WebInput runat="server" ID="wiTransHeaderSettlementDue" Width="100px" CausesValidation="false"&amp;gt;
                                                    &amp;lt;EditFormat&amp;gt;
                                                        &amp;lt;ErrorWindowStyle ForeColor="Red"&amp;gt;&amp;lt;/ErrorWindowStyle&amp;gt;
                                                    &amp;lt;/EditFormat&amp;gt;
                                                    &amp;lt;FrameStyle&amp;gt;
                                                        &amp;lt;Normal BackColor="White" BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" Height="100%"&amp;gt;&amp;lt;/Normal&amp;gt;
                                                        &amp;lt;Over BackColor="WhiteSmoke" BaseStyle="Normal" BorderColor="MidnightBlue" BorderStyle="Solid" BorderWidth="1px"&amp;gt;&amp;lt;/Over&amp;gt;
                                                        &amp;lt;Active BackColor="White" BaseStyle="Over"&amp;gt;&amp;lt;/Active&amp;gt;
                                                    &amp;lt;/FrameStyle&amp;gt;
                                                    &amp;lt;DateTimeEditor IsEnabled="True"&amp;gt;
                                                        &amp;lt;DateTimeStyle BorderColor="MidnightBlue" BorderStyle="Solid" BorderWidth="1px" Height="140px" Width="200px"&amp;gt;&amp;lt;/DateTimeStyle&amp;gt;
                                                        &amp;lt;DayStyle&amp;gt;
                                                            &amp;lt;Normal Cursor="Hand" Font-Names="Arial" Font-Size="10px"&amp;gt;&amp;lt;/Normal&amp;gt;
                                                            &amp;lt;Over BackColor="DarkOrange" BaseStyle="Normal" Cursor="Hand" Font-Names="Arial" Font-Size="10px"&amp;gt;&amp;lt;/Over&amp;gt;
                                                            &amp;lt;Active BackColor="RoyalBlue" BaseStyle="Over" Cursor="Hand" Font-Names="Arial" Font-Size="10px"&amp;gt;&amp;lt;/Active&amp;gt;
                                                        &amp;lt;/DayStyle&amp;gt;
                                                        &amp;lt;OtherMonthDayStyle Cursor="Hand" Font-Names="Arial" Font-Size="10px" ForeColor="Silver" /&amp;gt;
                                                        &amp;lt;HeaderDayStyle Font-Bold="True" Font-Names="Arial" Font-Size="11px"&amp;gt;&amp;lt;/HeaderDayStyle&amp;gt;
                                                        &amp;lt;HighLightMonthYearStyle BackColor="Gainsboro" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Font-Bold="True"&amp;gt;&amp;lt;/HighLightMonthYearStyle&amp;gt;
                                                        &amp;lt;DropDownMonthYearTextStyle Cursor="Hand" Font-Names="Arial" Font-Size="10px"&amp;gt;&amp;lt;/DropDownMonthYearTextStyle&amp;gt;
                                                        &amp;lt;DropDownMonthYearHighLightTextStyle BackColor="WhiteSmoke" Cursor="Hand" Font-Names="Arial" Font-Size="10px"&amp;gt;&amp;lt;/DropDownMonthYearHighLightTextStyle&amp;gt;
                                                        &amp;lt;DropDownMonthYearUpDownButtonStyle BackColor="#FFD294" Cursor="Hand" Font-Names="Arial" Font-Size="10px"&amp;gt;&amp;lt;/DropDownMonthYearUpDownButtonStyle&amp;gt;
                                                        &amp;lt;HeaderStyle BackColor="DarkOrange" BackColor2="255, 210, 148" Font-Bold="True" Font-Names="Arial" Font-Size="10pt" GradientType="Vertical" Height="24px" /&amp;gt;
                                                        &amp;lt;FooterStyle BackColor="#FFF2C8" Font-Bold="True" Font-Names="Arial" Font-Size="11px" Height="20px" /&amp;gt;
                                                        &amp;lt;DayOffStyle Font-Bold="True" Font-Names="Arial" Font-Size="11px" ForeColor="Red" Height="20px"&amp;gt;&amp;lt;/DayOffStyle&amp;gt;
                                                        &amp;lt;HolidayStyle BackColor="WhiteSmoke" Font-Bold="True" Font-Names="Arial" Font-Size="11px" ForeColor="Red" Height="20px"&amp;gt;&amp;lt;/HolidayStyle&amp;gt;
                                                        &amp;lt;WindowInfo DisplayType="Normal"&amp;gt;&amp;lt;/WindowInfo&amp;gt;
                                                    &amp;lt;/DateTimeEditor&amp;gt;          
                                                    &amp;lt;CultureInfo CultureName="en-US"&amp;gt;&amp;lt;/CultureInfo&amp;gt;
                                                    &amp;lt;DisplayFormat Format="dd-MMM-yyyy" IsEnabled="True" /&amp;gt;
                                                    &amp;lt;DropDownStyle&amp;gt;
                                                        &amp;lt;Normal Cursor="Hand" CssClass="WebInputDropDownStyleNormal"&amp;gt;&amp;lt;/Normal&amp;gt;
                                                        &amp;lt;Over BaseStyle="Normal" Cursor="Hand" CssClass="WebInputDropDownStyleOver"&amp;gt;&amp;lt;/Over&amp;gt;
                                                        &amp;lt;Active BaseStyle="Normal"&amp;gt;&amp;lt;/Active&amp;gt;
                                                    &amp;lt;/DropDownStyle&amp;gt;
                                                    &amp;lt;CalculatorEditor&amp;gt;
                                                            &amp;lt;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"&amp;gt;
                                                            &amp;lt;/CalculatorStyle&amp;gt;
                                                            &amp;lt;OperandStyle&amp;gt;
                                                                &amp;lt;Normal BackColor="#FFD294" BorderColor="White" BorderStyle="Solid" BorderWidth="1px"
                                                                    Cursor="Hand"&amp;gt;
                                                                &amp;lt;/Normal&amp;gt;
                                                                &amp;lt;Over BackColor="White" BackColor2="255, 210, 148" BaseStyle="Normal" Cursor="Hand"
                                                                    GradientType="Vertical"&amp;gt;
                                                                &amp;lt;/Over&amp;gt;
                                                                &amp;lt;Active BackColor="DarkOrange" BackColor2="255, 210, 148" BaseStyle="Over" Cursor="Hand"&amp;gt;
                                                                &amp;lt;/Active&amp;gt;
                                                            &amp;lt;/OperandStyle&amp;gt;
                                                            &amp;lt;OperatorStyle&amp;gt;
                                                                &amp;lt;Normal BackColor="#FFD294" BorderColor="White" BorderStyle="Solid" BorderWidth="1px"
                                                                    Cursor="Hand"&amp;gt;
                                                                &amp;lt;/Normal&amp;gt;
                                                                &amp;lt;Over BackColor="White" BackColor2="255, 210, 148" BaseStyle="Normal" Cursor="Hand"
                                                                    GradientType="Vertical"&amp;gt;
                                                                &amp;lt;/Over&amp;gt;
                                                                &amp;lt;Active BackColor="DarkOrange" BackColor2="255, 210, 148" BaseStyle="Over" Cursor="Hand"&amp;gt;
                                                                &amp;lt;/Active&amp;gt;
                                                            &amp;lt;/OperatorStyle&amp;gt;
                                                            &amp;lt;WindowInfo DisplayType="Normal"&amp;gt;
                                                            &amp;lt;/WindowInfo&amp;gt;
                                                        &amp;lt;/CalculatorEditor&amp;gt;
                                                &amp;lt;/ISWebInput:WebInput&amp;gt;&lt;/pre&gt;

</description></item></channel></rss>