Skip to content

Commit 21aa04d

Browse files
committed
Fixing date issue.
1 parent 06953d4 commit 21aa04d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationDocumentService/BackendConfigurationDocumentService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,9 @@ public async Task<OperationResult> CreateDocumentAsync(BackendConfigurationDocum
568568

569569
if (model.EndDate.Year == 1)
570570
{
571-
return new OperationResult(false,
572-
_backendConfigurationLocalizationService.GetString("EndDateCannotBeEmpty"));
571+
model.EndDate = DateTime.UtcNow.AddYears(10);
572+
// return new OperationResult(false,
573+
// _backendConfigurationLocalizationService.GetString("EndDateCannotBeEmpty"));
573574
}
574575

575576
var core = await _coreHelper.GetCore();

eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-actions/document-create/documents-document-create.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class DocumentsDocumentCreateComponent implements OnInit {
123123

124124
createDocument() {
125125
this.newDocumentModel.folderId = this.selectedFolder;
126-
this.newDocumentModel.endDate = format(this.newDocumentModel.endDate as Date, PARSING_DATE_FORMAT);
126+
//this.newDocumentModel.endDate = format(this.newDocumentModel.endDate as Date, PARSING_DATE_FORMAT);
127127
this.backendConfigurationPnDocumentsService.createDocument(this.newDocumentModel)
128128
.subscribe((data) => {
129129
if (data && data.success) {

0 commit comments

Comments
 (0)