Reputation
212
Top tag
Next privilege 250 Rep.
View close votes
Badges
2 16
Impact
~27k people reached

Apr
18
awarded  Popular Question
Mar
17
accepted return blank if field is blank
Mar
17
asked return blank if field is blank
Mar
5
comment toLocaleDateString() formatting
if i were to modify the code from return "<div style='background-color:red;color:white'>" + dueDate.toLocaleDateString('en-GB') + "</div>"; to return "<div style='background-color:red;color:white'>" + String.format("{0:d}",style,days,dueDate) + "</div>"; will this work?
Mar
4
comment toLocaleDateString() formatting
@Chunkyfeather . Yes my dates look fine in other columns. As my knowledge in javascript is very basic, could you please tell me in the above code where would I insert that modification? thks
Mar
4
comment toLocaleDateString() formatting
I get ‎04‎/‎03‎/‎2016 which is correct. so why is this not working when I apply that code as JSLink to a webpart? this code is supposed to manipulate a column called "MaxEndDate"
Mar
4
awarded  Yearling
Mar
4
asked toLocaleDateString() formatting
Mar
4
comment Color code due date field if 6 months before current date
this is still messing my dates. unless I change my locale to English US, which defeats the purpose.
Mar
3
comment Color code due date field if 6 months before current date
I am getting somewhere. it seams date if I change my Locale to English US, then the code works correctly
Mar
3
comment Color code due date field if 6 months before current date
@Danny Engelman. My Locale is english united kingdom. As I said I have not problems if I remove the code. Please read the entire post..
Mar
3
revised Color code due date field if 6 months before current date
the time frame needs to be within 180 from the present and future. edited the code to account for this
Mar
3
comment Color code due date field if 6 months before current date
Unfortunately this code is completing messing my dates. even when I type the English US format, i.e. MM/DD/YYYY it does not always work correctly. when I use 08/25/2016 it will not accept the date (red marks it). also tried dueDate.toLocaleDateString("en-GB") but still does not work.
Mar
3
suggested approved edit on Color code due date field if 6 months before current date
Mar
2
comment Color code due date field if 6 months before current date
I just need to output the date to this format DD/MM/YYYY.
Mar
2
comment Color code due date field if 6 months before current date
it is only happing in this field. I have other date fileds in this list and it is fine. As is said, prior to this code the field was formatting the date correctly. In fact, when I remove the JSLink the field works correctly again
Mar
2
comment Color code due date field if 6 months before current date
@Dylan Cristy , for some reason the MaxEnddate is now incorrectly formating the date. the format should be DD/MM/YYYY. if I edit the field value, the format is changed to MM/DD/YYYY. Any idea why this is happening?
Mar
1
comment Color code due date field if 6 months before current date
@Eric Alexander. to target my field "MaxEndDate", do I only replace "DueDate" in statusFieldCtx.Templates.Fields section ? I read somewhere that this where the field is set for manipulation.
Mar
1
comment Color code due date field if 6 months before current date
The color should be RED if the value is within 180 days, i.e 179 days. what piece in the code do I need to modify? my field is actually named "MaxEndDate"
Mar
1
asked Color code due date field if 6 months before current date