0

hi i am using the datatables plugin and date range filter out want. The problem is that the dates That I have them in this format: dd / mm / yyyy H: i: s in the table. When I give to filter out the dialog datapicker but I put the H: i: s any way to do?

http://jquery-datatables-column-filter.googlecode.com/svn/trunk/dateRange.html

Another question I have that as change the words From: and To: to display them in my language.

bensiu
  • 24,660
  • 56
  • 77
  • 117
Bicu
  • 497
  • 3
  • 9
  • 21
  • checkout with jquery-ui demo(jquery-ui-1.9.0.custom/development-bundle/demos/datepicker/date-formats.html), i hope your solution is there. – Sumant Nov 01 '12 at 13:51
  • datepicker plugin does not work with hours. thanks – Bicu Nov 01 '12 at 14:00
  • 1
    so you want time also. go for time picker addon for jquery. http://trentrichardson.com/examples/timepicker/ – Sumant Nov 03 '12 at 06:47

2 Answers2

0

Use a format in jquery time picker / datepicker that matches your database. Use these code for converting the datepicker for mysql

$.datepicker.regional[""].dateFormat = 'yy-mm-dd';
$.datepicker.setDefaults($.datepicker.regional['']);

You will have to use similar thing for the time picker

shababhsiddique
  • 904
  • 3
  • 14
  • 40
0

You should use something like this:

var date = $('#datepicker').datepicker({ dateFormat: 'dd-mm-yy' }).val();

Reference: jQuery UI DatePicker - Change Date Format

Community
  • 1
  • 1
Burak Karakuş
  • 1,368
  • 5
  • 20
  • 43