I just liked fullcalendar and wanted to apply it in a small application, everything worked fine. I am able to get events from my database from the front end through JSO. But all incidents are being listed as "All-Day" incidents. It is not able to understand why .. The screenshot for the same is any idea what is going wrong ..? I am using asp.net and c # I have already tried to send start and end dates to ToString (), ToShortDateString (), ToString ("s"), ToLongDateString (), ToUniversalTime (). At this time nothing is working for me. I tried hard and sent the data too. Sample my data json
[{"id": "2", "title": "Event2", "Start": "1274171700", "End": "1274175600"} , {"Id": "1", "Title": "Event 1", "Start": "5/18/2010 16:30:00", "End": "5/18/2010 19:30: 00 "}, {" Id ":" 3 "," Title ":" Event 3 "," Start ":" 5/18/2010 2:05:00 pm "," End ":" 5/18/2010 3:10: "5/18/2010", "End": "5/18/2010"}, {"ED": "4", "Title": "Event4", "Start" ID ":" 5 "," Title ":" Event5 "," Start ":" 2010-05-18T14: 05: 00 "," End ":" 2010-05-18T15: 10: 00 "}]
< / P>
All data given above have different formats of dates, and nothing works at this time Is doing. All calendars fix part of the day, but not part of time. not sure why. Can anyone help?
OK, I found out that the problem was Allday: "wrong" by the Newtonsoft.Json library < / Code>: Incorrect code was being provided as "allDay". The wrong main culprit was in the quotation marks. Just >> <<> changed the code. Change ("\" False \ "", "" False ") and it worked like a charm! It was surprisingly nothing happened with dates! Anyway .. Thanks ..
Edit: Keeping in mind some more things, listing it below
- The start and end dates are formatted like
String.Format ("{0: MM / Dd / yyyy HH: mm: ss} ", startdate)
This time part formats in 24 hours, - Everything is something mandatory (not sure) because when it comes Not to mention all, so wrong: this is incorrect, and it does not appear to be expected.
- Already described above, all days: wrong, false is considered without quotes.Newtonsoft.Json All people using the library will face to ensure this problem.
Now for everyone!
Comments
Post a Comment