Issue with Submitting DateField Value as ExtraParams (MVC)

  1. #1

    Issue with Submitting DateField Value as ExtraParams (MVC)

    Is it the right way of passing value of DateField. It is reporting an error that feeDate parameter is null ( saveApplicationFee method in controller declareed it as DateTime) ?

    .DirectEvents(de => {
    	de.Click.Url = Url.Action("saveApplicationFee");
    	de.Click.Before = "alert(Ext.getCmp('txtFeeDate').getValue());Ext.Msg.wait('saving data. Please wait','Saving..');";
    	de.Click.Success = "Ext.Msg.alert('Success','Data has been saved successfully.');";
    	de.Click.ExtraParams.Add(X.Parameter().Name("feeDate").Value("Ext.getCmp('txtFeeDate').getValue()").Mode(ParameterMode.Raw));
    	de.Click.FormID = "FormPanelSave";
    })
    In the FormPanel it is defined as

    .Items(
    	X.Label().Text("Please enter the Application Fee and Date Fee Received -"),    
    	X.NumberField().ID("txtFeeAmount").Name("FeeAmount").FieldLabel("Fee Amount"),
    	X.DateField().ID("txtFeeDate").Name("FeeDate").FieldLabel("Date Received")
    ),
    the alert in de.Click.Before is showing the DateField value though. Any clue would help a lot..

    Thanks,
  2. #2
    Hi
    try with
    Value = "Ext.Date.format(new Date(Ext.getCmp('txtFeeDate').getValue()),'m/d/y')",
    in extraparam ,if not working please provide a simplified test case.

Similar Threads

  1. [CLOSED] Issue with Datefield
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 31, 2013, 11:46 AM
  2. Replies: 6
    Last Post: Jan 09, 2013, 10:30 AM
  3. Replies: 6
    Last Post: Aug 01, 2011, 4:53 PM
  4. [CLOSED] Submitting A DateField Value From A FormPanel
    By ilanga in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 30, 2010, 12:00 PM
  5. [CLOSED] DateField: issue
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Aug 24, 2010, 10:13 AM

Tags for this Thread

Posting Permissions