thekingsimo / jquery-week-calendar

Automatically exported from code.google.com/p/jquery-week-calendar
0 stars 0 forks source link

But does not satisfy the data #127

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Dear, 
I'm trying using WeekCalendar with ASP.NET, but I am not able to pass the 
data to the WeekCalendar; see what I'm doing: 
Step 01: 
date: "Resultado.aspx" 

Step 02: 

Class events
    Public id As Integer
    Public start As String
    Public [end] As String
    Public title As String
End Class

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As 
System.EventArgs) Handles Me.Load
        Dim conv As New ListItemCollectionConverter
        Dim seriali As New JavaScriptSerializer

        Dim mevet As New events()
        mevet.id = 1
        mevet.start = "2010-04-03T13:15:00.000+10:00" 
        mevet.end = "2010-04-03T14:15:00.000+10:00" 
        mevet.title = "Now...."

        Dim jss As New JavaScriptSerializer
        Dim stresult As String
        stresult = jss.Serialize(mevet)
        Response.Write(stresult)
    End Sub

But does not satisfy the data; Help me! Please;

Original issue reported on code.google.com by erivaldo...@gtempaccount.com on 3 Apr 2010 at 11:57

GoogleCodeExporter commented 8 years ago
I think it is the sintaxis of the datetime field, try this:

Dim start as DateTime = DateTime.Now
Dim end as DateTime = DateTime.Now.AddHours(3)

mevet.start = start.ToString("o")
mevet.end = end.ToString("o")

Original comment by sass...@hotmail.com on 13 Apr 2010 at 9:55

GoogleCodeExporter commented 8 years ago
I did what you said! But it did not work ... 
I need to create a function that returns the format that the WeekCalendar read 
...
Could you help me?
Tks
Erivaldo

Original comment by erivaldo...@gtempaccount.com on 14 Apr 2010 at 1:37

GoogleCodeExporter commented 8 years ago
I am doing it in C# with a IHttpHandler that return the data in JSON (with 
DataContractJsonSerializer) and simple convert the datetime as I told you, 
without 
any problems.
But I just now see that you are serializing only one event and the control is 
waiting 
for an array, maybe try to add the event (mevet) to a generic list and then 
serialize 
it.
Sorry about my english :)

Sashka

Original comment by sass...@hotmail.com on 17 Apr 2010 at 11:00