Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8221277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:51:20+00:00 2026-06-07T13:51:20+00:00

Wrong date data format sent to server when update row event occurs. It goes

  • 0

Wrong date data format sent to server when update row event occurs. It goes to server as “01.01.0001 00:00:00” for all data sent. Row date data at client before sent is(I saw it by alert) “Sat May 05 2012 00:00:00 GMT+0300 (GTB Daylight Time)”. Any advice?

enter image description here

The clientside code is:

var gridSource = {
            datatype: "json",
            datafields: [{ name: 'KargoId' }, { name: 'Ad' }, { name: 'Soyad' },
            { name: 'YuklenmeTarihi', type: 'date' }, { name: 'Adet' }, { name: 'Fiyat'}],
            url: 'BindGrid',
            updaterow: function (rowid, rowdata) {                    

                if (selectedUrunId != undefined && selectedUrunId != -1) {
                    rowdata.UrunId = selectedUrunId;
                    selectedUrunId = -1;
                }

                alert(rowdata.YuklenmeTarihi);

                var data = $.param(rowdata);
                //alert(data);
                $.ajax({
                    dataType: 'json',
                    url: 'UpdateEditGrid',
                    data: data,
                    success: function (data, status, xhr) {
                        gridDataAdapter.dataBind();

                        /*if (data.Success == false)
                        alert(JSON.stringify(data));*/

                        /*if (data.Success == true && gridDataAdapter != undefined)
                        gridDataAdapter.dataBind();*/
                    },
                    error: function (xhr, status, error) {
                        alert(JSON.stringify(xhr));
                    }
                });
            }
        };

       var gridDataAdapter = new $.jqx.dataAdapter(gridSource, {
            downloadComplete: function (data, status, xhr) { },
            loadComplete: function (data) { },
            loadError: function (xhr, status, error) { alert(JSON.stringify(xhr)); }
        });



        // initialize jqxGrid
        $("#jqxgrid").jqxGrid(
        {
            width: 670,
            source: gridDataAdapter,
            editable: true,
            theme: theme,
            selectionmode: 'singlecell',
            columns: [
              { text: '#', datafield: 'KargoId', width: 40 },
              { text: 'Ad', columntype: 'textbox', datafield: 'Ad', width: 90 },
              { text: 'Soyad', datafield: 'Soyad', columntype: 'textbox', width: 90 },                  
              { text: 'YuklenmeTarihi', datafield: 'YuklenmeTarihi', columntype: 'datetimeinput', width: 90, cellsalign: 'right', cellsformat: 'd',
                  validation: function (cell, value) {
                      var year = value.getFullYear();
                      if (year >= 2013) {
                          return { result: false, message: "Yükleme zamanı 1/1/2013 tarihinden önce olmalı!" };
                      }
                      return true;
                  }
              },
              { text: 'Adet', datafield: 'Adet', width: 70, cellsalign: 'right', columntype: 'numberinput',
                  validation: function (cell, value) {
                      if (value < 1 || value > 15) {
                          return { result: false, message: "Adet 1-15 aralığında olmalı!" };
                      }
                      return true;
                  },
                  initeditor: function (row, cellvalue, editor) {
                      editor.jqxNumberInput({ decimalDigits: 0, digits: 3 });
                  }
              },
              { text: 'Fiyat', datafield: 'Fiyat', width: 65, cellsalign: 'right', cellsformat: 'c2', columntype: 'numberinput',
                  validation: function (cell, value) {
                      if (value < 0 || value > 15) {
                          return { result: false, message: "Fiyat 0-15 aralığında olmalı!" };
                      }
                      return true;
                  },
                  initeditor: function (row, cellvalue, editor) {
                      editor.jqxNumberInput({ digits: 3 });
                  }
              }
            ]
        });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:51:21+00:00Added an answer on June 7, 2026 at 1:51 pm

    In updaterow function, before data definition(var data = $.param(rowdata);) I changed date data like :

                    var dateToChange = JSON.stringify(rowdata.YuklenmeTarihi);
                    rowdata.YuklenmeTarihi = dateToChange.replace(/"/g, '');
    

    Then it worked. replace(/"/g, '') trims all double quotes if you wonder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to format a date into required format. but i receive wrong
What's wrong with my code?? string birthdate = ((DataRowView)comboBox1.SelectedItem).Row[birthdate].ToString(); //pulled the data into the
UPDATE my show function def show @contact = Contact.find(params[:id]) @data = Register.all :include =>
I have a CSV file in the following format: id,code,date,address,complete_url Example data from the
when i'm inserting data to the sql server 2008 database through asp.net application date
Im trying to convert unixtime to date but the results im getting are wrong
What is wrong with the following PostgreSQL query? UPDATE project_project SET project_project.create_date = assignments.start_date
What's wrong with this regular expression? It won't work var patt = /[0-9]{2}/[0-9]{2}/[1-9]{4}/; if(patt.test(document.getElementById('date').value)
What wrong with this validation: Jquery: $(document).ready(function(){ $(#addcmd).attr(disabled,disabled); $(#cmdstxt).keypress( function(event){ var txt=$(#cmdstxt); if( txt.val().length
I use the query: UPDATE `times` SET `date` = 2012-04-04 WHERE `id` = 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.