@legalplace/prerenderx 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/libs/FillPdfForm.js
CHANGED
|
@@ -53,11 +53,9 @@ var FillPdfForm = (function (_super) {
|
|
|
53
53
|
var currentValue = this.getVariableValue(variable.id);
|
|
54
54
|
if (currentValue !== false) {
|
|
55
55
|
var dateRegex = /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/;
|
|
56
|
-
console.log('Value for', variable.id, currentValue, dateRegex.test(currentValue));
|
|
57
56
|
if (variable.date && dateRegex.test(currentValue)) {
|
|
58
57
|
switch (variable.date) {
|
|
59
58
|
case 'DD':
|
|
60
|
-
console.log('Value s', variable.id, input.name, currentValue.replace(dateRegex, '$1'), dateRegex.test(currentValue));
|
|
61
59
|
return currentValue.replace(dateRegex, '$1');
|
|
62
60
|
case 'MM':
|
|
63
61
|
return currentValue.replace(dateRegex, '$2');
|
package/package.json
CHANGED
package/src/libs/FillPdfForm.ts
CHANGED
|
@@ -51,11 +51,9 @@ class FillPdfForm extends FillPdfFormBase {
|
|
|
51
51
|
if (currentValue !== false) {
|
|
52
52
|
// Date values
|
|
53
53
|
const dateRegex = /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/
|
|
54
|
-
console.log('Value for', variable.id, currentValue, dateRegex.test(currentValue))
|
|
55
54
|
if (variable.date && dateRegex.test(currentValue)) {
|
|
56
55
|
switch (variable.date) {
|
|
57
56
|
case 'DD':
|
|
58
|
-
console.log('Value s', variable.id, input.name, currentValue.replace(dateRegex, '$1'), dateRegex.test(currentValue))
|
|
59
57
|
return currentValue.replace(dateRegex, '$1')
|
|
60
58
|
case 'MM':
|
|
61
59
|
return currentValue.replace(dateRegex, '$2')
|