1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

News datestamp now retains value when editing. Updated datetime picker.

This commit is contained in:
Cameron
2013-02-20 17:38:34 -08:00
parent 312dad5b3b
commit 50b922f588
4 changed files with 1954 additions and 1537 deletions

View File

@@ -157,7 +157,17 @@ $(document).ready(function()
// Dates --------------------------------------------------
/*
// http://tarruda.github.com/bootstrap-datetimepicker/
// $('.e-datetime').datetimepicker();
$('.e-datetime').datetimepicker({
language: 'en',
pick12HourFormat: true
});
*/
$("input.e-date").each(function() {
$(this).datepicker({
dateFormat: $(this).attr("data-date-format"),
@@ -168,15 +178,23 @@ $(document).ready(function()
});
$("input.e-datetime").each(function() {
// var name = $(this).attr("name");
// var val = $(this).val();
// alert(name + ': ' + val);
$(this).datetimepicker({
dateFormat: $(this).attr("data-date-format"),
timeFormat: $(this).attr("data-time-format"),
defaultDate: $(this).val(),
defaultValue: $(this).val(),
setDate: $(this).val(),
ampm: $(this).attr("data-date-ampm"),
firstDay: $(this).attr("data-date-firstday"),
// firstDay: $(this).attr("data-date-firstday"),
showButtonPanel: true
});
});
// Inline versions
$("div.e-date").each(function() {
var id = $(this).attr("id");
@@ -207,7 +225,7 @@ $(document).ready(function()
$(this).datetimepicker('setDate', $("#"+newid).val());
});
// Tabs -----------------------------------------------------

File diff suppressed because it is too large Load Diff