Skip to main content
replaced http://salesforce.stackexchange.com/ with https://salesforce.stackexchange.com/
Source Link

There are several workarounds for this issue.

  1. The most simple in this case is to use YYYY-MM-DD.

So we would have to change line

component.set("v.record.Date__c", '2016-1-1' );

into

component.set("v.record.Date__c", '2016-01-01' );
  1. Another possible workaround is mentioned herehere:

We could add line

rec.Date__c = new Date( rec.Date__c );

just after

var rec = component.get( 'v.record' );

line in perform method of javascript controller.

  1. Another general workaround for a custom date population was described herehere.

There are several workarounds for this issue.

  1. The most simple in this case is to use YYYY-MM-DD.

So we would have to change line

component.set("v.record.Date__c", '2016-1-1' );

into

component.set("v.record.Date__c", '2016-01-01' );
  1. Another possible workaround is mentioned here:

We could add line

rec.Date__c = new Date( rec.Date__c );

just after

var rec = component.get( 'v.record' );

line in perform method of javascript controller.

  1. Another general workaround for a custom date population was described here.

There are several workarounds for this issue.

  1. The most simple in this case is to use YYYY-MM-DD.

So we would have to change line

component.set("v.record.Date__c", '2016-1-1' );

into

component.set("v.record.Date__c", '2016-01-01' );
  1. Another possible workaround is mentioned here:

We could add line

rec.Date__c = new Date( rec.Date__c );

just after

var rec = component.get( 'v.record' );

line in perform method of javascript controller.

  1. Another general workaround for a custom date population was described here.
Source Link
Patlatus
  • 17.8k
  • 13
  • 82
  • 191

There are several workarounds for this issue.

  1. The most simple in this case is to use YYYY-MM-DD.

So we would have to change line

component.set("v.record.Date__c", '2016-1-1' );

into

component.set("v.record.Date__c", '2016-01-01' );
  1. Another possible workaround is mentioned here:

We could add line

rec.Date__c = new Date( rec.Date__c );

just after

var rec = component.get( 'v.record' );

line in perform method of javascript controller.

  1. Another general workaround for a custom date population was described here.