We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Datepicker show date incorrectly

Thread ID:

Created:

Updated:

Platform:

Replies:

121277 Nov 25,2015 10:33 PM UTC Dec 1,2015 04:00 PM UTC ASP.NET Web Forms 9
loading
Tags: DatePicker
Roimer Machacón Otero
Asked On November 25, 2015 10:33 PM UTC

Hi, we´re using datepicker syncfusion. This have a dateformat "MM/dd/yyyy" and in server method assigned the actual date of this form: 
"txtFechaRemision.Value = Format(Date.Now.Date, "MM/dd/yyyy")"

Now inspecting in visual studio the format is show correctly (example for today 11/25/2015), now when this is showed in the page appear 25/11/2015

Attached image with the error.

Thanks!

Attachment: error_76698c13.rar

Saravanan Janakiraman [Syncfusion]
Replied On November 26, 2015 01:32 PM UTC

Hi Roimer,


Thanks for contacting Syncfusion support.


We are unable to reproduce the reported query at our end. We have prepared the sample to showcase the solution, you can download it from the following location.


Sample Location: Datepicker Dateformat Sample


If still you face difficulties, please revert back the sample based on your application to showcase the issue at our end. Also please tell us the version that you are currently using in your application. This would be helpful for us to analyze more about your problem and provide a solution at the earliest.


Regards,

Saravanan A J


Roimer Machacón Otero
Replied On November 26, 2015 02:27 PM UTC

Hi, we have applied the example and this not working in our project.

Attached image with the error.

Attachment: error2_d152182c.rar

Roimer Machacón Otero
Replied On November 26, 2015 02:38 PM UTC

Also if the date if selected in the datepicker this showed correctly. 

Attached image with the case

Attachment: error3_553af77c.rar

Saravanan Janakiraman [Syncfusion]
Replied On November 27, 2015 12:28 PM UTC

Hi Roimer, 

Sorry for the inconvenience caused.

We were unable to reproduce the issue at our end. 

Please share the below information to us: 

Localization of the browser, operation system, and visual studio.

Also, the product version that you are currently using in your application.

If possible, please reproduce the issue in the provided sample to check it at our end, which would be helpful for us to investigate further and provide the exact solution.

Regards, 

Saravanan A J

Roimer Machacón Otero
Replied On November 27, 2015 10:31 PM UTC

Hi, 

Here is the requested information

Localization of the browser: Google chrome we tested with language configuration in spanish(Colombia) and english (United states)
Operation system: Windows 7 Professional
Visual studio : 2013 express for web

Selvamani Sankarappan [Syncfusion]
Replied On November 30, 2015 12:24 PM UTC

Hi Roimer,

Thanks for the update.

We were still unable to reproduce the issue at our end. We have checked the reported issue in Spanish and English cultures and the datepicker shows the date in the specified format (“MM/dd/YYYY). Could you please check this sample and let us know whether this sample works properly at your end or not?

Sample Location:

http://www.syncfusion.com/downloads/support/forum/121277/ze/Rotator457427170

If the code implementation is different from your application, please revert back the sample based on your code to showcase the issue at our end. We had used 13.3.0.12 version in the above sample. Could you please ensure that you are using the same version as Syncfusion? If you are using a different version, please let us know the version details. This information will be helpful to provide the solution.

Regards,

Selvamani S



Roimer Machacón Otero
Replied On November 30, 2015 02:06 PM UTC

Hi we're using the syncfusion version 12.2.0.36, and the example is not working for today appear 30/11/2015 and for the format MM/dd/yyyy would be 11/30/2015

Roimer Machacón Otero
Replied On November 30, 2015 04:19 PM UTC

Hi, updating the error that occurs.

We've a linkbutton event with this:

 Protected Sub lkbNuevoRemision_Click(ByVal sender As Object, ByVal e As EventArgs) Handles lkbNuevoRemision.Click
        Try
            CargarJavaScriptEnClienteCabeceraRemision() ---------->(1)
            modoNuevoRemision() ---------->(2)
        Catch ex As Exception
            MensajeDeUsuario(ex.Message.ToString)
        End Try
    End Sub

  • In the function (1) have this:

Private Sub CargarJavaScriptEnClienteCabeceraRemision()
            ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "011", "funcionesFechas();", True)
End Sub

funcionesFechas is a javascript function that make this:

function funcionesFechas() {           
            $("#txtFechaRemision").ejDatePicker({
                dateFormat: "MM/dd/yyyy",
                focusOut: function (args) {
                    document.getElementById('<%= txtFechaPesaje.ClientID%>').focus();
                }
            });

            $("#txtFechaPesaje").ejDatePicker({
                dateFormat: "MM/dd/yyyy",
                focusOut: function (args) {
                    document.getElementById('<%= txtPesoTotal.ClientID%>').focus();
                }
            });
        }

Use this function to pass the focus of the datepickers when this focus out for another textbox

  • In the function (2) have this:
 Public Sub modoNuevoRemision()
            txtFechaRemision.Value = implementacionFecha.convertirCadenaFormato(System.DateTime.Now.ToShortDateString)
            txtFechaRemision.DateFormat = "MM/dd/yyyy"
 End Sub

With this function put the current date with the format.

Now that occurs when add the function (1) CargarJavaScriptEnClienteCabeceraRemision the date not showed with the format appear for today 30/11/2015 and must be 11/30/2015.
But if commented this function the date appear correctly but lost the focus when focus out of the datepickers.

Note: Need events of client-side javascript


Arun Palaniyandi [Syncfusion]
Replied On December 1, 2015 04:00 PM UTC

Hi Roimer,

Thanks for the update,

We have analyzed your code and found that you are assigning date format from both server side and from client side. Instead you can assign the dateformat from client side alone. Also in the ‘focusout’ event of the datepicker, you can focus the next datpicker using the datepicker object as shown in the below code,

Please let us know whether the provided solution helps to resolve your issue. 

Regards,
Selvamani S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;