This personal blog at mysite. For this issues i cannot add customs css right? what i think right now, i want change date formatting become "09 Nov" not "09 November", is that possible ?
2 Answers
Go to the Posts list of your blog -> list settings -> click on "Created" column, there you schould be able to change the showing date format to "Standard"
-
it still not working.. it still show 09 November not 09 Nov :( By the way this blog at My Site, that means personal blog. how can i make formatted date 09 Nov by default?– gihnihCommented Nov 12, 2014 at 1:34
Since in SharePoint 2013 Client Side Rendering is a default rendering mode, i would recommend the following approach to set PublishingDate
field format.
The solution is to override the format of PublishingDate
field before rendering the post as demonstrated below:
JavaScript template
SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
ListTemplateType: 301,
OnPreRender: function(ctx) {
var rows = ctx.ListData.Row;
for (var i=0;i<rows.length;i++)
{
var monthString = rows[i]["PublishedDate.MonthDayOnly"];
var monthParts = monthString.split(" ");
monthParts[0] = monthParts[0].substring(0,3);
rows[i]["PublishedDate.MonthDayOnly"] = monthParts.join(" ");
}
}
});
How to apply changes
Probably the easiest way would to insert the specified code into the page using Content Editor
or Script Editor
web parts.
- Open the page in Edit mode
- Add Script Editor web part and insert the provided code by enclosing it using
script
tag - Save the changes
Result
-
Hello sir, right now this personal blog at My Site, i can edit page but only for my blog only, how can i want make to all other user's blog? BTW, at personal blog it dont have content editor.– gihnihCommented Nov 12, 2014 at 1:37