Hi
We have 5 metadata fields that represent scheduled date and each have the Display Format set to d/m/Y H:i:s, but if I want to manipulate them in jQuery they switch to American format.
Metadata setting - Display Format (Figure 1 of attachment)
They are maintained through a Simple Edit using:
<div class="date-selector">%metadata-F_17093%</div>
Displayed on Simple Edit (Figure 2 of attachment)
Stored as (Figure 3 of attachment)
On the general display page, I build a key pair object to manipulate once the page is ready:
<script type="text/javascript">
today = %globals_date^date_format:Ymd%;
dateObj = { %globals_asset_metadata_ScheduleDatesOne^date_format:Ymd% : '%globals_asset_metadata_ScheduleDatesOne^date_format:r%',
%globals_asset_metadata_ScheduleDatesTwo^date_format:Ymd% : '%globals_asset_metadata_ScheduleDatesTwo^date_format:r%',
%globals_asset_metadata_ScheduleDatesThree^date_format:Ymd% : '%globals_asset_metadata_ScheduleDatesThree^date_format:r%',
%globals_asset_metadata_ScheduleDatesFour^date_format:Ymd% : '%globals_asset_metadata_ScheduleDatesFour^date_format:r%',
%globals_asset_metadata_ScheduleDatesFive^date_format:Ymd% : '%globals_asset_metadata_ScheduleDatesFive^date_format:r%' };
</script>
When I manipulate these fields (using Firebug) they appear as (Figure 4 of attachment)
Any ideas why? Date formatting issues.doc (36.5 KB)