@acorex/components 16.19.16 → 16.19.18

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.
@@ -4165,6 +4165,9 @@ class AXDatePickerComponent extends AXValidatableComponent {
4165
4165
  return { year: y, month: m, day: d };
4166
4166
  }
4167
4167
  textChange(e) {
4168
+ if (this.setLoadingToClear) {
4169
+ return;
4170
+ }
4168
4171
  if (this.setLoading || !e.isUserChange) {
4169
4172
  return;
4170
4173
  }
@@ -4257,6 +4260,9 @@ class AXDatePickerComponent extends AXValidatableComponent {
4257
4260
  set value(v) {
4258
4261
  const oldValue = this._value;
4259
4262
  const old = this.value;
4263
+ if (this.setLoadingToClear) {
4264
+ return;
4265
+ }
4260
4266
  if (v) {
4261
4267
  this._value = new AXDateTime(v, this.type);
4262
4268
  }
@@ -4385,744 +4391,729 @@ class AXDatePickerComponent extends AXValidatableComponent {
4385
4391
  this.dropdown.toggle();
4386
4392
  });
4387
4393
  }
4394
+ setLoadingToClear = false;
4388
4395
  handleKeyPress(e) {
4389
- if (e.type == 'keydown' || e.type == 'keypress' || e.type == 'keyup') {
4390
- if (e.key === 'Delete') {
4391
- e.preventDefault();
4392
- }
4393
- if (e.key === 'Backspace') {
4394
- this.clear();
4395
- }
4396
- if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
4397
- if (this.input.input.nativeElement.selectionStart ||
4398
- this.input.input.nativeElement.selectionStart === 0) {
4399
- this.cursorPosition = this.input.input.nativeElement.selectionStart;
4400
- }
4401
- }
4402
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4403
- e.preventDefault();
4404
- e.stopPropagation();
4405
- }
4406
- }
4407
- const inputChar = String.fromCharCode(e.charCode);
4408
- if (this.text != undefined) {
4409
- const ind1 = this.text.charAt(0);
4410
- const ind2 = this.text.charAt(1);
4411
- const ind3 = this.text.charAt(2);
4412
- const ind4 = this.text.charAt(3);
4413
- const ind5 = this.text.charAt(4);
4414
- const ind6 = this.text.charAt(5);
4415
- const ind7 = this.text.charAt(6);
4416
- const ind8 = this.text.charAt(7);
4417
- const ind9 = this.text.charAt(8);
4418
- const ind10 = this.text.charAt(9);
4419
- switch (this.dateType) {
4420
- case this.yyyyMMdd:
4421
- if (e.type == 'keypress') {
4422
- this.handleClick();
4423
- if ((ind6 == '1' && ind7 == '_' && inputChar >= '3') ||
4424
- (((ind6 == '0' && ind7 == '_') ||
4425
- (ind9 == '0' && ind10 == '_')) &&
4426
- inputChar == '0')) {
4427
- e.preventDefault();
4428
- }
4429
- else if (ind9 == '3' && ind10 == '_') {
4430
- if (ind6 + ind7 <= '06' && inputChar >= '2') {
4431
- e.preventDefault();
4432
- }
4433
- else if (ind6 + ind7 > '06' && inputChar >= '1') {
4434
- e.preventDefault();
4435
- }
4436
- }
4437
- }
4438
- if (this.text.indexOf('_') === -1 && this.text !== '') {
4439
- if (e.type === 'keydown') {
4440
- if (e.key === 'ArrowUp') {
4441
- if (this.cursorPosition <= 4) {
4442
- this.text =
4443
- String(Number(ind1 + ind2 + ind3 + ind4) + 1) +
4444
- ind5 +
4445
- ind6 +
4446
- ind7 +
4447
- ind8 +
4448
- ind9 +
4449
- ind10;
4450
- }
4451
- if (this.cursorPosition >= 5 && this.cursorPosition <= 7) {
4452
- if (Number(ind6 + ind7) < 12) {
4453
- if (Number(ind6 + ind7) < 9) {
4454
- this.text =
4455
- ind1 +
4456
- ind2 +
4457
- ind3 +
4458
- ind4 +
4459
- ind5 +
4460
- '0' +
4461
- String(Number(ind6 + ind7) + 1) +
4462
- ind8 +
4463
- ind9 +
4464
- ind10;
4465
- }
4466
- else {
4467
- this.text =
4468
- ind1 +
4469
- ind2 +
4470
- ind3 +
4471
- ind4 +
4472
- ind5 +
4473
- String(Number(ind6 + ind7) + 1) +
4474
- ind8 +
4475
- ind9 +
4476
- ind10;
4477
- }
4478
- }
4479
- else {
4480
- this.text =
4481
- ind1 +
4482
- ind2 +
4483
- ind3 +
4484
- ind4 +
4485
- ind5 +
4486
- '01' +
4487
- ind8 +
4488
- ind9 +
4489
- ind10;
4490
- }
4491
- }
4492
- if (this.cursorPosition >= 8) {
4493
- if (Number(ind9 + ind10) < 31) {
4494
- if (Number(ind9 + ind10) < 9) {
4495
- this.text =
4496
- ind1 +
4497
- ind2 +
4498
- ind3 +
4499
- ind4 +
4500
- ind5 +
4501
- ind6 +
4502
- ind7 +
4503
- ind8 +
4504
- '0' +
4505
- String(Number(ind9 + ind10) + 1);
4506
- }
4507
- else {
4508
- this.text =
4509
- ind1 +
4510
- ind2 +
4511
- ind3 +
4512
- ind4 +
4513
- ind5 +
4514
- ind6 +
4515
- ind7 +
4516
- ind8 +
4517
- String(Number(ind9 + ind10) + 1);
4518
- }
4519
- }
4520
- else {
4521
- this.text =
4522
- ind1 +
4523
- ind2 +
4524
- ind3 +
4525
- ind4 +
4526
- ind5 +
4527
- ind6 +
4528
- ind7 +
4529
- ind8 +
4530
- '01';
4531
- }
4532
- }
4533
- // this.input.input.nativeElement.style.caretColor = 'transparent';
4534
- // setTimeout(() => {
4535
- // this.setCaret();
4536
- // e.preventDefault();
4537
- // this.input.input.nativeElement.style.caretColor = 'auto';
4538
- // }, 0);
4539
- // e.preventDefault();
4540
- }
4541
- else if (e.key === 'ArrowDown') {
4542
- if (this.cursorPosition <= 4) {
4543
- this.text =
4544
- String(Number(ind1 + ind2 + ind3 + ind4) - 1) +
4545
- ind5 +
4546
- ind6 +
4547
- ind7 +
4548
- ind8 +
4549
- ind9 +
4550
- ind10;
4551
- }
4552
- else if (this.cursorPosition > 4 &&
4553
- this.cursorPosition <= 7) {
4554
- if (Number(ind6 + ind7) > 1) {
4555
- if (Number(ind6 + ind7) < 11) {
4556
- this.text =
4557
- ind1 +
4558
- ind2 +
4559
- ind3 +
4560
- ind4 +
4561
- ind5 +
4562
- '0' +
4563
- String(Number(ind6 + ind7) - 1) +
4564
- ind8 +
4565
- ind9 +
4566
- ind10;
4567
- }
4568
- else {
4569
- this.text =
4570
- ind1 +
4571
- ind2 +
4572
- ind3 +
4573
- ind4 +
4574
- ind5 +
4575
- String(Number(ind6 + ind7) - 1) +
4576
- ind8 +
4577
- ind9 +
4578
- ind10;
4579
- }
4580
- }
4581
- else {
4582
- this.text =
4583
- ind1 +
4584
- ind2 +
4585
- ind3 +
4586
- ind4 +
4587
- ind5 +
4588
- '12' +
4589
- ind8 +
4590
- ind9 +
4591
- ind10;
4592
- }
4593
- }
4594
- else if (this.cursorPosition >= 8) {
4595
- if (Number(ind9 + ind10) > 1) {
4596
- if (Number(ind9 + ind10) < 11) {
4597
- this.text =
4598
- ind1 +
4599
- ind2 +
4600
- ind3 +
4601
- ind4 +
4602
- ind5 +
4603
- ind6 +
4604
- ind7 +
4605
- ind8 +
4606
- '0' +
4607
- String(Number(ind9 + ind10) - 1);
4608
- }
4609
- else {
4610
- this.text =
4611
- ind1 +
4612
- ind2 +
4613
- ind3 +
4614
- ind4 +
4615
- ind5 +
4616
- ind6 +
4617
- ind7 +
4618
- ind8 +
4619
- String(Number(ind9 + ind10) - 1);
4620
- }
4621
- }
4622
- else {
4623
- this.text =
4624
- ind1 +
4625
- ind2 +
4626
- ind3 +
4627
- ind4 +
4628
- ind5 +
4629
- ind6 +
4630
- ind7 +
4631
- ind8 +
4632
- '31';
4633
- }
4634
- }
4635
- // this.input.input.nativeElement.style.caretColor = 'transparent';
4636
- // setTimeout(() => {
4637
- // this.setCaret();
4638
- // this.input.input.nativeElement.style.caretColor = 'auto';
4639
- // }, 0);
4640
- }
4641
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4642
- this.input.input.nativeElement.style.caretColor = 'transparent';
4643
- e.preventDefault();
4644
- e.stopPropagation();
4645
- return false;
4646
- }
4647
- }
4648
- }
4649
- if (e.type === 'keyup') {
4650
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4651
- this.setCaret();
4652
- this.input.input.nativeElement.style.caretColor = 'auto';
4653
- e.preventDefault();
4654
- e.stopPropagation();
4655
- }
4656
- }
4657
- break;
4658
- case this.ddMMyyyy:
4659
- if (e.type === 'keypress') {
4660
- this.handleClick();
4661
- if ((ind4 == '1' && ind5 == '_' && inputChar >= '3') ||
4662
- (((ind1 == '0' && ind2 == '_') || (ind4 == '0' && ind5 == '_')) &&
4663
- inputChar == '0')) {
4664
- e.preventDefault();
4665
- }
4666
- else {
4667
- if (ind1 == '3' && ind2 == '_' && inputChar >= '2') {
4668
- e.preventDefault();
4669
- }
4670
- }
4671
- }
4672
- if (this.text.indexOf('_') === -1 && this.text !== '') {
4673
- if (e.type === 'keydown') {
4674
- if (e.key === 'ArrowUp') {
4675
- if (this.cursorPosition >= 6) {
4676
- this.text =
4677
- ind1 +
4678
- ind2 +
4679
- ind3 +
4680
- ind4 +
4681
- ind5 +
4682
- ind6 +
4683
- String(Number(ind7 + ind8 + ind9 + ind10) + 1);
4684
- }
4685
- if (this.cursorPosition > 2 && this.cursorPosition <= 5) {
4686
- if (Number(ind4 + ind5) < 12) {
4687
- if (Number(ind4 + ind5) < 9) {
4688
- this.text =
4689
- ind1 +
4690
- ind2 +
4691
- ind3 +
4692
- '0' +
4693
- String(Number(ind4 + ind5) + 1) +
4694
- ind6 +
4695
- ind7 +
4696
- ind8 +
4697
- ind9 +
4698
- ind10;
4699
- }
4700
- else {
4701
- this.text =
4702
- ind1 +
4703
- ind2 +
4704
- ind3 +
4705
- String(Number(ind4 + ind5) + 1) +
4706
- ind6 +
4707
- ind7 +
4708
- ind8 +
4709
- ind9 +
4710
- ind10;
4711
- }
4712
- }
4713
- else {
4714
- this.text =
4715
- ind1 +
4716
- ind2 +
4717
- ind3 +
4718
- '01' +
4719
- ind6 +
4720
- ind7 +
4721
- ind8 +
4722
- ind9 +
4723
- ind10;
4724
- }
4725
- }
4726
- if (this.cursorPosition <= 2) {
4727
- if (Number(ind1 + ind2) < 31) {
4728
- if (Number(ind1 + ind2) < 9) {
4729
- this.text =
4730
- '0' +
4731
- String(Number(ind1 + ind2) + 1) +
4732
- ind3 +
4733
- ind4 +
4734
- ind5 +
4735
- ind6 +
4736
- ind7 +
4737
- ind8 +
4738
- ind9 +
4739
- ind10;
4740
- }
4741
- else {
4742
- this.text =
4743
- String(Number(ind1 + ind2) + 1) +
4744
- ind3 +
4745
- ind4 +
4746
- ind5 +
4747
- ind6 +
4748
- ind7 +
4749
- ind8 +
4750
- ind9 +
4751
- ind10;
4752
- }
4753
- }
4754
- else {
4755
- this.text =
4756
- '01' +
4757
- ind3 +
4758
- ind4 +
4759
- ind5 +
4760
- ind6 +
4761
- ind7 +
4762
- ind8 +
4763
- ind9 +
4764
- ind10;
4765
- }
4766
- }
4767
- // this.input.input.nativeElement.style.caretColor = 'transparent';
4768
- // setTimeout(() => {
4769
- // this.setCaret();
4770
- // this.input.input.nativeElement.style.caretColor = 'auto';
4771
- // }, 0);
4772
- }
4773
- else if (e.key === 'ArrowDown') {
4774
- if (this.cursorPosition >= 6) {
4775
- this.text =
4776
- ind1 +
4777
- ind2 +
4778
- ind3 +
4779
- ind4 +
4780
- ind5 +
4781
- ind6 +
4782
- String(Number(ind7 + ind8 + ind9 + ind10) - 1);
4783
- }
4784
- else if (this.cursorPosition > 2 &&
4785
- this.cursorPosition <= 5) {
4786
- if (Number(ind4 + ind5) > 1) {
4787
- if (Number(ind4 + ind5) < 11) {
4788
- this.text =
4789
- ind1 +
4790
- ind2 +
4791
- ind3 +
4792
- '0' +
4793
- String(Number(ind4 + ind5) - 1) +
4794
- ind6 +
4795
- ind7 +
4796
- ind8 +
4797
- ind9 +
4798
- ind10;
4799
- }
4800
- else {
4801
- this.text =
4802
- ind1 +
4803
- ind2 +
4804
- ind3 +
4805
- String(Number(ind4 + ind5) - 1) +
4806
- ind6 +
4807
- ind7 +
4808
- ind8 +
4809
- ind9 +
4810
- ind10;
4811
- }
4812
- }
4813
- else {
4814
- this.text =
4815
- ind1 +
4816
- ind2 +
4817
- ind3 +
4818
- '12' +
4819
- ind6 +
4820
- ind7 +
4821
- ind8 +
4822
- ind9 +
4823
- ind10;
4824
- }
4825
- }
4826
- else if (this.cursorPosition <= 2) {
4827
- if (Number(ind1 + ind2) > 1) {
4828
- if (Number(ind1 + ind2) < 11) {
4829
- this.text =
4830
- '0' +
4831
- String(Number(ind1 + ind2) - 1) +
4832
- ind3 +
4833
- ind4 +
4834
- ind5 +
4835
- ind6 +
4836
- ind7 +
4837
- ind8 +
4838
- ind9 +
4839
- ind10;
4840
- }
4841
- else {
4842
- this.text =
4843
- String(Number(ind1 + ind2) - 1) +
4844
- ind3 +
4845
- ind4 +
4846
- ind5 +
4847
- ind6 +
4848
- ind7 +
4849
- ind8 +
4850
- ind9 +
4851
- ind10;
4852
- }
4853
- }
4854
- else {
4855
- this.text =
4856
- '31' +
4857
- ind3 +
4858
- ind4 +
4859
- ind5 +
4860
- ind6 +
4861
- ind7 +
4862
- ind8 +
4863
- ind9 +
4864
- ind10;
4865
- }
4866
- }
4867
- // this.input.input.nativeElement.style.caretColor = 'transparent';
4868
- // setTimeout(() => {
4869
- // this.setCaret();
4870
- // this.input.input.nativeElement.style.caretColor = 'auto';
4871
- // }, 0);
4872
- }
4873
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4874
- this.input.input.nativeElement.style.caretColor = 'transparent';
4875
- e.preventDefault();
4876
- e.stopPropagation();
4877
- return false;
4878
- }
4879
- }
4880
- }
4881
- if (e.type === 'keyup') {
4882
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4883
- this.setCaret();
4884
- this.input.input.nativeElement.style.caretColor = 'auto';
4885
- e.preventDefault();
4886
- e.stopPropagation();
4887
- }
4888
- }
4889
- break;
4890
- case this.MMddyyyy:
4891
- if (e.type === 'keypress') {
4892
- if ((ind9 === '1' && ind10 == '_' && inputChar >= '3') ||
4893
- (((ind6 == '0' && ind7 == '_') || (ind9 == '0' && ind10)) &&
4894
- inputChar == '0')) {
4895
- e.preventDefault();
4896
- }
4897
- else if (ind6 == '3' && ind7 == '_' && inputChar >= '2') {
4898
- e.preventDefault();
4899
- }
4900
- setTimeout(() => {
4901
- this.handleClick();
4902
- }, 0);
4903
- }
4904
- if (this.text.indexOf('_') === -1 && this.text !== '') {
4905
- if (e.type === 'keydown') {
4906
- if (e.key === 'ArrowUp') {
4907
- if (this.cursorPosition <= 4) {
4908
- this.text =
4909
- String(Number(ind1 + ind2 + ind3 + ind4) + 1) +
4910
- ind5 +
4911
- ind6 +
4912
- ind7 +
4913
- ind8 +
4914
- ind9 +
4915
- ind10;
4916
- }
4917
- if (this.cursorPosition > 4 && this.cursorPosition <= 7) {
4918
- if (Number(ind6 + ind7) < 31) {
4919
- if (Number(ind6 + ind7) < 9) {
4920
- this.text =
4921
- ind1 +
4922
- ind2 +
4923
- ind3 +
4924
- ind4 +
4925
- ind5 +
4926
- '0' +
4927
- String(Number(ind6 + ind7) + 1) +
4928
- ind8 +
4929
- ind9 +
4930
- ind10;
4931
- }
4932
- else {
4933
- this.text =
4934
- ind1 +
4935
- ind2 +
4936
- ind3 +
4937
- ind4 +
4938
- ind5 +
4939
- String(Number(ind6 + ind7) + 1) +
4940
- ind8 +
4941
- ind9 +
4942
- ind10;
4943
- }
4944
- }
4945
- else {
4946
- this.text =
4947
- ind1 +
4948
- ind2 +
4949
- ind3 +
4950
- ind4 +
4951
- ind5 +
4952
- '01' +
4953
- ind8 +
4954
- ind9 +
4955
- ind10;
4956
- }
4957
- }
4958
- if (this.cursorPosition >= 8) {
4959
- if (Number(ind9 + ind10) < 12) {
4960
- if (Number(ind9 + ind10) < 9) {
4961
- this.text =
4962
- ind1 +
4963
- ind2 +
4964
- ind3 +
4965
- ind4 +
4966
- ind5 +
4967
- ind6 +
4968
- ind7 +
4969
- ind8 +
4970
- '0' +
4971
- String(Number(ind9 + ind10) + 1);
4972
- }
4973
- else {
4974
- this.text =
4975
- ind1 +
4976
- ind2 +
4977
- ind3 +
4978
- ind4 +
4979
- ind5 +
4980
- ind6 +
4981
- ind7 +
4982
- ind8 +
4983
- String(Number(ind9 + ind10) + 1);
4984
- }
4985
- }
4986
- else {
4987
- this.text =
4988
- ind1 +
4989
- ind2 +
4990
- ind3 +
4991
- ind4 +
4992
- ind5 +
4993
- ind6 +
4994
- ind7 +
4995
- ind8 +
4996
- '01';
4997
- }
4998
- }
4999
- // this.input.input.nativeElement.style.caretColor = 'transparent';
5000
- // setTimeout(() => {
5001
- // this.setCaret();
5002
- // this.input.input.nativeElement.style.caretColor = 'auto';
5003
- // }, 0);
5004
- }
5005
- else if (e.key === 'ArrowDown') {
5006
- if (this.cursorPosition <= 4) {
5007
- this.text =
5008
- String(Number(ind1 + ind2 + ind3 + ind4) - 1) +
5009
- ind5 +
5010
- ind6 +
5011
- ind7 +
5012
- ind8 +
5013
- ind9 +
5014
- ind10;
5015
- }
5016
- else if (this.cursorPosition > 4 &&
5017
- this.cursorPosition <= 7) {
5018
- if (Number(ind6 + ind7) > 1) {
5019
- if (Number(ind6 + ind7) < 11) {
5020
- this.text =
5021
- ind1 +
5022
- ind2 +
5023
- ind3 +
5024
- ind4 +
5025
- ind5 +
5026
- '0' +
5027
- String(Number(ind6 + ind7) - 1) +
5028
- ind8 +
5029
- ind9 +
5030
- ind10;
5031
- }
5032
- else {
5033
- this.text =
5034
- ind1 +
5035
- ind2 +
5036
- ind3 +
5037
- ind4 +
5038
- ind5 +
5039
- String(Number(ind6 + ind7) - 1) +
5040
- ind8 +
5041
- ind9 +
5042
- ind10;
5043
- }
5044
- }
5045
- else {
5046
- this.text =
5047
- ind1 +
5048
- ind2 +
5049
- ind3 +
5050
- ind4 +
5051
- ind5 +
5052
- '31' +
5053
- ind8 +
5054
- ind9 +
5055
- ind10;
5056
- }
5057
- }
5058
- else if (this.cursorPosition >= 8) {
5059
- if (Number(ind9 + ind10) > 1) {
5060
- if (Number(ind9 + ind10) < 11) {
5061
- this.text =
5062
- ind1 +
5063
- ind2 +
5064
- ind3 +
5065
- ind4 +
5066
- ind5 +
5067
- ind6 +
5068
- ind7 +
5069
- ind8 +
5070
- '0' +
5071
- String(Number(ind9 + ind10) - 1);
5072
- }
5073
- else {
5074
- this.text =
5075
- ind1 +
5076
- ind2 +
5077
- ind3 +
5078
- ind4 +
5079
- ind5 +
5080
- ind6 +
5081
- ind7 +
5082
- ind8 +
5083
- String(Number(ind9 + ind10) - 1);
5084
- }
5085
- }
5086
- else {
5087
- this.text =
5088
- ind1 +
5089
- ind2 +
5090
- ind3 +
5091
- ind4 +
5092
- ind5 +
5093
- ind6 +
5094
- ind7 +
5095
- ind8 +
5096
- '12';
5097
- }
5098
- }
5099
- // this.input.input.nativeElement.style.caretColor = 'transparent';
5100
- // setTimeout(() => {
5101
- // this.setCaret();
5102
- // this.input.input.nativeElement.style.caretColor = 'auto';
5103
- // }, 0);
5104
- }
5105
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
5106
- this.input.input.nativeElement.style.caretColor = 'transparent';
5107
- e.preventDefault();
5108
- e.stopPropagation();
5109
- return false;
5110
- }
5111
- }
5112
- }
5113
- if (e.type === 'keyup') {
5114
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
5115
- this.setCaret();
5116
- this.input.input.nativeElement.style.caretColor = 'auto';
5117
- e.preventDefault();
5118
- e.stopPropagation();
5119
- }
5120
- }
5121
- break;
5122
- default:
5123
- break;
5124
- }
5125
- }
4396
+ if (e.key === 'Backspace' && e.type === 'keydown') {
4397
+ this.clearTextBox();
4398
+ this.setLoadingToClear = true;
4399
+ }
4400
+ // if (e.type == 'keydown' || e.type == 'keypress' || e.type == 'keyup') {
4401
+ // if (e.key === 'Delete') {
4402
+ // e.preventDefault();
4403
+ // }
4404
+ // if (e.key === 'Backspace') {
4405
+ // this.clear();
4406
+ // }
4407
+ // if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
4408
+ // if (
4409
+ // this.input.input.nativeElement.selectionStart ||
4410
+ // this.input.input.nativeElement.selectionStart === 0
4411
+ // ) {
4412
+ // this.cursorPosition = this.input.input.nativeElement.selectionStart;
4413
+ // }
4414
+ // }
4415
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4416
+ // e.preventDefault();
4417
+ // e.stopPropagation();
4418
+ // }
4419
+ // }
4420
+ // const inputChar = String.fromCharCode(e.charCode);
4421
+ // if (this.text != undefined) {
4422
+ // const ind1 = this.text.charAt(0);
4423
+ // const ind2 = this.text.charAt(1);
4424
+ // const ind3 = this.text.charAt(2);
4425
+ // const ind4 = this.text.charAt(3);
4426
+ // const ind5 = this.text.charAt(4);
4427
+ // const ind6 = this.text.charAt(5);
4428
+ // const ind7 = this.text.charAt(6);
4429
+ // const ind8 = this.text.charAt(7);
4430
+ // const ind9 = this.text.charAt(8);
4431
+ // const ind10 = this.text.charAt(9);
4432
+ // switch (this.dateType) {
4433
+ // case this.yyyyMMdd:
4434
+ // if (e.type == 'keypress') {
4435
+ // this.handleClick();
4436
+ // if (
4437
+ // (ind6 == '1' && ind7 == '_' && inputChar >= '3') ||
4438
+ // (((ind6 == '0' && ind7 == '_') ||
4439
+ // (ind9 == '0' && ind10 == '_')) &&
4440
+ // inputChar == '0')
4441
+ // ) {
4442
+ // e.preventDefault();
4443
+ // } else if (ind9 == '3' && ind10 == '_') {
4444
+ // if (ind6 + ind7 <= '06' && inputChar >= '2') {
4445
+ // e.preventDefault();
4446
+ // } else if (ind6 + ind7 > '06' && inputChar >= '1') {
4447
+ // e.preventDefault();
4448
+ // }
4449
+ // }
4450
+ // }
4451
+ // if (this.text.indexOf('_') === -1 && this.text !== '') {
4452
+ // if (e.type === 'keydown') {
4453
+ // if (e.key === 'ArrowUp') {
4454
+ // if (this.cursorPosition <= 4) {
4455
+ // this.text =
4456
+ // String(Number(ind1 + ind2 + ind3 + ind4) + 1) +
4457
+ // ind5 +
4458
+ // ind6 +
4459
+ // ind7 +
4460
+ // ind8 +
4461
+ // ind9 +
4462
+ // ind10;
4463
+ // }
4464
+ // if (this.cursorPosition >= 5 && this.cursorPosition <= 7) {
4465
+ // if (Number(ind6 + ind7) < 12) {
4466
+ // if (Number(ind6 + ind7) < 9) {
4467
+ // this.text =
4468
+ // ind1 +
4469
+ // ind2 +
4470
+ // ind3 +
4471
+ // ind4 +
4472
+ // ind5 +
4473
+ // '0' +
4474
+ // String(Number(ind6 + ind7) + 1) +
4475
+ // ind8 +
4476
+ // ind9 +
4477
+ // ind10;
4478
+ // } else {
4479
+ // this.text =
4480
+ // ind1 +
4481
+ // ind2 +
4482
+ // ind3 +
4483
+ // ind4 +
4484
+ // ind5 +
4485
+ // String(Number(ind6 + ind7) + 1) +
4486
+ // ind8 +
4487
+ // ind9 +
4488
+ // ind10;
4489
+ // }
4490
+ // } else {
4491
+ // this.text =
4492
+ // ind1 +
4493
+ // ind2 +
4494
+ // ind3 +
4495
+ // ind4 +
4496
+ // ind5 +
4497
+ // '01' +
4498
+ // ind8 +
4499
+ // ind9 +
4500
+ // ind10;
4501
+ // }
4502
+ // }
4503
+ // if (this.cursorPosition >= 8) {
4504
+ // if (Number(ind9 + ind10) < 31) {
4505
+ // if (Number(ind9 + ind10) < 9) {
4506
+ // this.text =
4507
+ // ind1 +
4508
+ // ind2 +
4509
+ // ind3 +
4510
+ // ind4 +
4511
+ // ind5 +
4512
+ // ind6 +
4513
+ // ind7 +
4514
+ // ind8 +
4515
+ // '0' +
4516
+ // String(Number(ind9 + ind10) + 1);
4517
+ // } else {
4518
+ // this.text =
4519
+ // ind1 +
4520
+ // ind2 +
4521
+ // ind3 +
4522
+ // ind4 +
4523
+ // ind5 +
4524
+ // ind6 +
4525
+ // ind7 +
4526
+ // ind8 +
4527
+ // String(Number(ind9 + ind10) + 1);
4528
+ // }
4529
+ // } else {
4530
+ // this.text =
4531
+ // ind1 +
4532
+ // ind2 +
4533
+ // ind3 +
4534
+ // ind4 +
4535
+ // ind5 +
4536
+ // ind6 +
4537
+ // ind7 +
4538
+ // ind8 +
4539
+ // '01';
4540
+ // }
4541
+ // }
4542
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4543
+ // // setTimeout(() => {
4544
+ // // this.setCaret();
4545
+ // // e.preventDefault();
4546
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
4547
+ // // }, 0);
4548
+ // // e.preventDefault();
4549
+ // } else if (e.key === 'ArrowDown') {
4550
+ // if (this.cursorPosition <= 4) {
4551
+ // this.text =
4552
+ // String(Number(ind1 + ind2 + ind3 + ind4) - 1) +
4553
+ // ind5 +
4554
+ // ind6 +
4555
+ // ind7 +
4556
+ // ind8 +
4557
+ // ind9 +
4558
+ // ind10;
4559
+ // } else if (
4560
+ // this.cursorPosition > 4 &&
4561
+ // this.cursorPosition <= 7
4562
+ // ) {
4563
+ // if (Number(ind6 + ind7) > 1) {
4564
+ // if (Number(ind6 + ind7) < 11) {
4565
+ // this.text =
4566
+ // ind1 +
4567
+ // ind2 +
4568
+ // ind3 +
4569
+ // ind4 +
4570
+ // ind5 +
4571
+ // '0' +
4572
+ // String(Number(ind6 + ind7) - 1) +
4573
+ // ind8 +
4574
+ // ind9 +
4575
+ // ind10;
4576
+ // } else {
4577
+ // this.text =
4578
+ // ind1 +
4579
+ // ind2 +
4580
+ // ind3 +
4581
+ // ind4 +
4582
+ // ind5 +
4583
+ // String(Number(ind6 + ind7) - 1) +
4584
+ // ind8 +
4585
+ // ind9 +
4586
+ // ind10;
4587
+ // }
4588
+ // } else {
4589
+ // this.text =
4590
+ // ind1 +
4591
+ // ind2 +
4592
+ // ind3 +
4593
+ // ind4 +
4594
+ // ind5 +
4595
+ // '12' +
4596
+ // ind8 +
4597
+ // ind9 +
4598
+ // ind10;
4599
+ // }
4600
+ // } else if (this.cursorPosition >= 8) {
4601
+ // if (Number(ind9 + ind10) > 1) {
4602
+ // if (Number(ind9 + ind10) < 11) {
4603
+ // this.text =
4604
+ // ind1 +
4605
+ // ind2 +
4606
+ // ind3 +
4607
+ // ind4 +
4608
+ // ind5 +
4609
+ // ind6 +
4610
+ // ind7 +
4611
+ // ind8 +
4612
+ // '0' +
4613
+ // String(Number(ind9 + ind10) - 1);
4614
+ // } else {
4615
+ // this.text =
4616
+ // ind1 +
4617
+ // ind2 +
4618
+ // ind3 +
4619
+ // ind4 +
4620
+ // ind5 +
4621
+ // ind6 +
4622
+ // ind7 +
4623
+ // ind8 +
4624
+ // String(Number(ind9 + ind10) - 1);
4625
+ // }
4626
+ // } else {
4627
+ // this.text =
4628
+ // ind1 +
4629
+ // ind2 +
4630
+ // ind3 +
4631
+ // ind4 +
4632
+ // ind5 +
4633
+ // ind6 +
4634
+ // ind7 +
4635
+ // ind8 +
4636
+ // '31';
4637
+ // }
4638
+ // }
4639
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4640
+ // // setTimeout(() => {
4641
+ // // this.setCaret();
4642
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
4643
+ // // }, 0);
4644
+ // }
4645
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4646
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
4647
+ // e.preventDefault();
4648
+ // e.stopPropagation();
4649
+ // return false;
4650
+ // }
4651
+ // }
4652
+ // }
4653
+ // if (e.type === 'keyup') {
4654
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4655
+ // this.setCaret();
4656
+ // this.input.input.nativeElement.style.caretColor = 'auto';
4657
+ // e.preventDefault();
4658
+ // e.stopPropagation();
4659
+ // }
4660
+ // }
4661
+ // break;
4662
+ // case this.ddMMyyyy:
4663
+ // if (e.type === 'keypress') {
4664
+ // this.handleClick();
4665
+ // if (
4666
+ // (ind4 == '1' && ind5 == '_' && inputChar >= '3') ||
4667
+ // (((ind1 == '0' && ind2 == '_') || (ind4 == '0' && ind5 == '_')) &&
4668
+ // inputChar == '0')
4669
+ // ) {
4670
+ // e.preventDefault();
4671
+ // } else {
4672
+ // if (ind1 == '3' && ind2 == '_' && inputChar >= '2') {
4673
+ // e.preventDefault();
4674
+ // }
4675
+ // }
4676
+ // }
4677
+ // if (this.text.indexOf('_') === -1 && this.text !== '') {
4678
+ // if (e.type === 'keydown') {
4679
+ // if (e.key === 'ArrowUp') {
4680
+ // if (this.cursorPosition >= 6) {
4681
+ // this.text =
4682
+ // ind1 +
4683
+ // ind2 +
4684
+ // ind3 +
4685
+ // ind4 +
4686
+ // ind5 +
4687
+ // ind6 +
4688
+ // String(Number(ind7 + ind8 + ind9 + ind10) + 1);
4689
+ // }
4690
+ // if (this.cursorPosition > 2 && this.cursorPosition <= 5) {
4691
+ // if (Number(ind4 + ind5) < 12) {
4692
+ // if (Number(ind4 + ind5) < 9) {
4693
+ // this.text =
4694
+ // ind1 +
4695
+ // ind2 +
4696
+ // ind3 +
4697
+ // '0' +
4698
+ // String(Number(ind4 + ind5) + 1) +
4699
+ // ind6 +
4700
+ // ind7 +
4701
+ // ind8 +
4702
+ // ind9 +
4703
+ // ind10;
4704
+ // } else {
4705
+ // this.text =
4706
+ // ind1 +
4707
+ // ind2 +
4708
+ // ind3 +
4709
+ // String(Number(ind4 + ind5) + 1) +
4710
+ // ind6 +
4711
+ // ind7 +
4712
+ // ind8 +
4713
+ // ind9 +
4714
+ // ind10;
4715
+ // }
4716
+ // } else {
4717
+ // this.text =
4718
+ // ind1 +
4719
+ // ind2 +
4720
+ // ind3 +
4721
+ // '01' +
4722
+ // ind6 +
4723
+ // ind7 +
4724
+ // ind8 +
4725
+ // ind9 +
4726
+ // ind10;
4727
+ // }
4728
+ // }
4729
+ // if (this.cursorPosition <= 2) {
4730
+ // if (Number(ind1 + ind2) < 31) {
4731
+ // if (Number(ind1 + ind2) < 9) {
4732
+ // this.text =
4733
+ // '0' +
4734
+ // String(Number(ind1 + ind2) + 1) +
4735
+ // ind3 +
4736
+ // ind4 +
4737
+ // ind5 +
4738
+ // ind6 +
4739
+ // ind7 +
4740
+ // ind8 +
4741
+ // ind9 +
4742
+ // ind10;
4743
+ // } else {
4744
+ // this.text =
4745
+ // String(Number(ind1 + ind2) + 1) +
4746
+ // ind3 +
4747
+ // ind4 +
4748
+ // ind5 +
4749
+ // ind6 +
4750
+ // ind7 +
4751
+ // ind8 +
4752
+ // ind9 +
4753
+ // ind10;
4754
+ // }
4755
+ // } else {
4756
+ // this.text =
4757
+ // '01' +
4758
+ // ind3 +
4759
+ // ind4 +
4760
+ // ind5 +
4761
+ // ind6 +
4762
+ // ind7 +
4763
+ // ind8 +
4764
+ // ind9 +
4765
+ // ind10;
4766
+ // }
4767
+ // }
4768
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4769
+ // // setTimeout(() => {
4770
+ // // this.setCaret();
4771
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
4772
+ // // }, 0);
4773
+ // } else if (e.key === 'ArrowDown') {
4774
+ // if (this.cursorPosition >= 6) {
4775
+ // this.text =
4776
+ // ind1 +
4777
+ // ind2 +
4778
+ // ind3 +
4779
+ // ind4 +
4780
+ // ind5 +
4781
+ // ind6 +
4782
+ // String(Number(ind7 + ind8 + ind9 + ind10) - 1);
4783
+ // } else if (
4784
+ // this.cursorPosition > 2 &&
4785
+ // this.cursorPosition <= 5
4786
+ // ) {
4787
+ // if (Number(ind4 + ind5) > 1) {
4788
+ // if (Number(ind4 + ind5) < 11) {
4789
+ // this.text =
4790
+ // ind1 +
4791
+ // ind2 +
4792
+ // ind3 +
4793
+ // '0' +
4794
+ // String(Number(ind4 + ind5) - 1) +
4795
+ // ind6 +
4796
+ // ind7 +
4797
+ // ind8 +
4798
+ // ind9 +
4799
+ // ind10;
4800
+ // } else {
4801
+ // this.text =
4802
+ // ind1 +
4803
+ // ind2 +
4804
+ // ind3 +
4805
+ // String(Number(ind4 + ind5) - 1) +
4806
+ // ind6 +
4807
+ // ind7 +
4808
+ // ind8 +
4809
+ // ind9 +
4810
+ // ind10;
4811
+ // }
4812
+ // } else {
4813
+ // this.text =
4814
+ // ind1 +
4815
+ // ind2 +
4816
+ // ind3 +
4817
+ // '12' +
4818
+ // ind6 +
4819
+ // ind7 +
4820
+ // ind8 +
4821
+ // ind9 +
4822
+ // ind10;
4823
+ // }
4824
+ // } else if (this.cursorPosition <= 2) {
4825
+ // if (Number(ind1 + ind2) > 1) {
4826
+ // if (Number(ind1 + ind2) < 11) {
4827
+ // this.text =
4828
+ // '0' +
4829
+ // String(Number(ind1 + ind2) - 1) +
4830
+ // ind3 +
4831
+ // ind4 +
4832
+ // ind5 +
4833
+ // ind6 +
4834
+ // ind7 +
4835
+ // ind8 +
4836
+ // ind9 +
4837
+ // ind10;
4838
+ // } else {
4839
+ // this.text =
4840
+ // String(Number(ind1 + ind2) - 1) +
4841
+ // ind3 +
4842
+ // ind4 +
4843
+ // ind5 +
4844
+ // ind6 +
4845
+ // ind7 +
4846
+ // ind8 +
4847
+ // ind9 +
4848
+ // ind10;
4849
+ // }
4850
+ // } else {
4851
+ // this.text =
4852
+ // '31' +
4853
+ // ind3 +
4854
+ // ind4 +
4855
+ // ind5 +
4856
+ // ind6 +
4857
+ // ind7 +
4858
+ // ind8 +
4859
+ // ind9 +
4860
+ // ind10;
4861
+ // }
4862
+ // }
4863
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4864
+ // // setTimeout(() => {
4865
+ // // this.setCaret();
4866
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
4867
+ // // }, 0);
4868
+ // }
4869
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4870
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
4871
+ // e.preventDefault();
4872
+ // e.stopPropagation();
4873
+ // return false;
4874
+ // }
4875
+ // }
4876
+ // }
4877
+ // if (e.type === 'keyup') {
4878
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4879
+ // this.setCaret();
4880
+ // this.input.input.nativeElement.style.caretColor = 'auto';
4881
+ // e.preventDefault();
4882
+ // e.stopPropagation();
4883
+ // }
4884
+ // }
4885
+ // break;
4886
+ // case this.MMddyyyy:
4887
+ // if (e.type === 'keypress') {
4888
+ // if (
4889
+ // (ind9 === '1' && ind10 == '_' && inputChar >= '3') ||
4890
+ // (((ind6 == '0' && ind7 == '_') || (ind9 == '0' && ind10)) &&
4891
+ // inputChar == '0')
4892
+ // ) {
4893
+ // e.preventDefault();
4894
+ // } else if (ind6 == '3' && ind7 == '_' && inputChar >= '2') {
4895
+ // e.preventDefault();
4896
+ // }
4897
+ // setTimeout(() => {
4898
+ // this.handleClick();
4899
+ // }, 0);
4900
+ // }
4901
+ // if (this.text.indexOf('_') === -1 && this.text !== '') {
4902
+ // if (e.type === 'keydown') {
4903
+ // if (e.key === 'ArrowUp') {
4904
+ // if (this.cursorPosition <= 4) {
4905
+ // this.text =
4906
+ // String(Number(ind1 + ind2 + ind3 + ind4) + 1) +
4907
+ // ind5 +
4908
+ // ind6 +
4909
+ // ind7 +
4910
+ // ind8 +
4911
+ // ind9 +
4912
+ // ind10;
4913
+ // }
4914
+ // if (this.cursorPosition > 4 && this.cursorPosition <= 7) {
4915
+ // if (Number(ind6 + ind7) < 31) {
4916
+ // if (Number(ind6 + ind7) < 9) {
4917
+ // this.text =
4918
+ // ind1 +
4919
+ // ind2 +
4920
+ // ind3 +
4921
+ // ind4 +
4922
+ // ind5 +
4923
+ // '0' +
4924
+ // String(Number(ind6 + ind7) + 1) +
4925
+ // ind8 +
4926
+ // ind9 +
4927
+ // ind10;
4928
+ // } else {
4929
+ // this.text =
4930
+ // ind1 +
4931
+ // ind2 +
4932
+ // ind3 +
4933
+ // ind4 +
4934
+ // ind5 +
4935
+ // String(Number(ind6 + ind7) + 1) +
4936
+ // ind8 +
4937
+ // ind9 +
4938
+ // ind10;
4939
+ // }
4940
+ // } else {
4941
+ // this.text =
4942
+ // ind1 +
4943
+ // ind2 +
4944
+ // ind3 +
4945
+ // ind4 +
4946
+ // ind5 +
4947
+ // '01' +
4948
+ // ind8 +
4949
+ // ind9 +
4950
+ // ind10;
4951
+ // }
4952
+ // }
4953
+ // if (this.cursorPosition >= 8) {
4954
+ // if (Number(ind9 + ind10) < 12) {
4955
+ // if (Number(ind9 + ind10) < 9) {
4956
+ // this.text =
4957
+ // ind1 +
4958
+ // ind2 +
4959
+ // ind3 +
4960
+ // ind4 +
4961
+ // ind5 +
4962
+ // ind6 +
4963
+ // ind7 +
4964
+ // ind8 +
4965
+ // '0' +
4966
+ // String(Number(ind9 + ind10) + 1);
4967
+ // } else {
4968
+ // this.text =
4969
+ // ind1 +
4970
+ // ind2 +
4971
+ // ind3 +
4972
+ // ind4 +
4973
+ // ind5 +
4974
+ // ind6 +
4975
+ // ind7 +
4976
+ // ind8 +
4977
+ // String(Number(ind9 + ind10) + 1);
4978
+ // }
4979
+ // } else {
4980
+ // this.text =
4981
+ // ind1 +
4982
+ // ind2 +
4983
+ // ind3 +
4984
+ // ind4 +
4985
+ // ind5 +
4986
+ // ind6 +
4987
+ // ind7 +
4988
+ // ind8 +
4989
+ // '01';
4990
+ // }
4991
+ // }
4992
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4993
+ // // setTimeout(() => {
4994
+ // // this.setCaret();
4995
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
4996
+ // // }, 0);
4997
+ // } else if (e.key === 'ArrowDown') {
4998
+ // if (this.cursorPosition <= 4) {
4999
+ // this.text =
5000
+ // String(Number(ind1 + ind2 + ind3 + ind4) - 1) +
5001
+ // ind5 +
5002
+ // ind6 +
5003
+ // ind7 +
5004
+ // ind8 +
5005
+ // ind9 +
5006
+ // ind10;
5007
+ // } else if (
5008
+ // this.cursorPosition > 4 &&
5009
+ // this.cursorPosition <= 7
5010
+ // ) {
5011
+ // if (Number(ind6 + ind7) > 1) {
5012
+ // if (Number(ind6 + ind7) < 11) {
5013
+ // this.text =
5014
+ // ind1 +
5015
+ // ind2 +
5016
+ // ind3 +
5017
+ // ind4 +
5018
+ // ind5 +
5019
+ // '0' +
5020
+ // String(Number(ind6 + ind7) - 1) +
5021
+ // ind8 +
5022
+ // ind9 +
5023
+ // ind10;
5024
+ // } else {
5025
+ // this.text =
5026
+ // ind1 +
5027
+ // ind2 +
5028
+ // ind3 +
5029
+ // ind4 +
5030
+ // ind5 +
5031
+ // String(Number(ind6 + ind7) - 1) +
5032
+ // ind8 +
5033
+ // ind9 +
5034
+ // ind10;
5035
+ // }
5036
+ // } else {
5037
+ // this.text =
5038
+ // ind1 +
5039
+ // ind2 +
5040
+ // ind3 +
5041
+ // ind4 +
5042
+ // ind5 +
5043
+ // '31' +
5044
+ // ind8 +
5045
+ // ind9 +
5046
+ // ind10;
5047
+ // }
5048
+ // } else if (this.cursorPosition >= 8) {
5049
+ // if (Number(ind9 + ind10) > 1) {
5050
+ // if (Number(ind9 + ind10) < 11) {
5051
+ // this.text =
5052
+ // ind1 +
5053
+ // ind2 +
5054
+ // ind3 +
5055
+ // ind4 +
5056
+ // ind5 +
5057
+ // ind6 +
5058
+ // ind7 +
5059
+ // ind8 +
5060
+ // '0' +
5061
+ // String(Number(ind9 + ind10) - 1);
5062
+ // } else {
5063
+ // this.text =
5064
+ // ind1 +
5065
+ // ind2 +
5066
+ // ind3 +
5067
+ // ind4 +
5068
+ // ind5 +
5069
+ // ind6 +
5070
+ // ind7 +
5071
+ // ind8 +
5072
+ // String(Number(ind9 + ind10) - 1);
5073
+ // }
5074
+ // } else {
5075
+ // this.text =
5076
+ // ind1 +
5077
+ // ind2 +
5078
+ // ind3 +
5079
+ // ind4 +
5080
+ // ind5 +
5081
+ // ind6 +
5082
+ // ind7 +
5083
+ // ind8 +
5084
+ // '12';
5085
+ // }
5086
+ // }
5087
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
5088
+ // // setTimeout(() => {
5089
+ // // this.setCaret();
5090
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
5091
+ // // }, 0);
5092
+ // }
5093
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
5094
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
5095
+ // e.preventDefault();
5096
+ // e.stopPropagation();
5097
+ // return false;
5098
+ // }
5099
+ // }
5100
+ // }
5101
+ // if (e.type === 'keyup') {
5102
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
5103
+ // this.setCaret();
5104
+ // this.input.input.nativeElement.style.caretColor = 'auto';
5105
+ // e.preventDefault();
5106
+ // e.stopPropagation();
5107
+ // }
5108
+ // }
5109
+ // break;
5110
+ // default:
5111
+ // break;
5112
+ // }
5113
+ // }
5114
+ setTimeout(() => {
5115
+ this.setLoadingToClear = false;
5116
+ }, 1000);
5126
5117
  }
5127
5118
  handleClick() {
5128
5119
  if (this.input.input.nativeElement.selectionStart ||
@@ -5149,13 +5140,13 @@ class AXDatePickerComponent extends AXValidatableComponent {
5149
5140
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXDatePickerComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5150
5141
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: AXDatePickerComponent, isStandalone: false, selector: "ax-date-picker", inputs: { dayStyle: { classPropertyName: "dayStyle", publicName: "dayStyle", isSignal: false, isRequired: false, transformFunction: null }, dayMinMaxResoan: { classPropertyName: "dayMinMaxResoan", publicName: "dayMinMaxResoan", isSignal: false, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: false, isRequired: false, transformFunction: null }, textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: false, isRequired: false, transformFunction: null }, showToday: { classPropertyName: "showToday", publicName: "showToday", isSignal: false, isRequired: false, transformFunction: null }, selectableHoliday: { classPropertyName: "selectableHoliday", publicName: "selectableHoliday", isSignal: false, isRequired: false, transformFunction: null }, dateType: { classPropertyName: "dateType", publicName: "dateType", isSignal: false, isRequired: false, transformFunction: null }, showTodayButton: { classPropertyName: "showTodayButton", publicName: "showTodayButton", isSignal: false, isRequired: false, transformFunction: null }, openByClick: { classPropertyName: "openByClick", publicName: "openByClick", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { typeChange: "typeChange", onValueChanged: "onValueChanged", valueChange: "valueChange" }, host: { styleAttribute: "width: 100%" }, providers: [
5151
5142
  { provide: AXValidatableComponent, useExisting: AXDatePickerComponent },
5152
- ], queries: [{ propertyName: "_contentValidation", first: true, predicate: AXValidation, descendants: true, static: true }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }, { propertyName: "calendarRef", first: true, predicate: ["calendarRef"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-drop-down\n [readonly]=\"readonly\"\n [fitParent]=\"false\"\n [size]=\"size\"\n [showDropDownButton]=\"false\"\n icon=\"far fa-calendar-alt\"\n #dropdown\n maxHeight=\"unset\"\n>\n <ng-container start>\n <ng-content select=\"[start]\"> </ng-content>\n </ng-container>\n <ng-container header>\n <ax-text-box\n [mask]=\"dateType\"\n [showMask]=\"true\"\n #input\n [textAlign]=\"textAlign\"\n [value]=\"text\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [size]=\"size\"\n (onBlur)=\"handleInputBlur()\"\n (click)=\"handleClick()\"\n (onValueChanged)=\"textChange($event)\"\n ></ax-text-box>\n </ng-container>\n <ng-container panel>\n @if (_renderPicker) {\n <ax-calendar-box\n #calendarRef\n [showTodayButton]=\"showTodayButton\"\n [selectableHoliday]=\"selectableHoliday\"\n [min]=\"min()\"\n [max]=\"max()\"\n [size]=\"size\"\n (onClick)=\"onClick($event)\"\n (onValueChanged)=\"onDateChange($event)\"\n [type]=\"type\"\n [(value)]=\"calendarValue\"\n [dayStyle]=\"dayStyle\"\n [dayMinMaxResoan]=\"dayMinMaxResoan\"\n >\n </ax-calendar-box>\n }\n </ng-container>\n <ng-container end>\n <ax-button\n end\n *ngIf=\"allowClear && value\"\n [disabled]=\"disabled\"\n icon=\"far fa-times icon\"\n type=\"blank danger\"\n (click)=\"clearTextBox()\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n end\n icon=\"far fa-calendar-alt icon\"\n type=\"light blank\"\n (click)=\"handleButtonClick()\"\n [disabled]=\"disabled\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n ></ax-button>\n <ng-content select=\"[end]\"> </ng-content>\n </ng-container>\n</ax-drop-down>\n", styles: [".ax-dropdown-container-bordered .ax-calendar-container{border:none!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AXDropdownComponent, selector: "ax-drop-down", inputs: ["rtl", "readonly", "loading", "dropdownWidth"], outputs: ["dropdownToggle", "onButtonClick"] }, { kind: "component", type: AXCalendarBoxComponent, selector: "ax-calendar-box", inputs: ["size", "type", "locale", "dir", "min", "max", "selectableHoliday", "dayStyle", "dayMinMaxResoan", "showTodayButton", "view", "depth", "value"], outputs: ["onValueChanged", "onClick", "valueChange"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }, { kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions", "leadZeroDateTime"] }], encapsulation: i0.ViewEncapsulation.None });
5143
+ ], queries: [{ propertyName: "_contentValidation", first: true, predicate: AXValidation, descendants: true, static: true }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }, { propertyName: "calendarRef", first: true, predicate: ["calendarRef"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-drop-down\n [readonly]=\"readonly\"\n [fitParent]=\"false\"\n [size]=\"size\"\n [showDropDownButton]=\"false\"\n icon=\"far fa-calendar-alt\"\n #dropdown\n maxHeight=\"unset\"\n>\n <ng-container start>\n <ng-content select=\"[start]\"> </ng-content>\n </ng-container>\n <ng-container header>\n <ax-text-box\n [mask]=\"dateType\"\n [showMask]=\"true\"\n #input\n [textAlign]=\"textAlign\"\n [value]=\"text\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [size]=\"size\"\n (onkey)=\"handleKeyPress($event)\"\n (onBlur)=\"handleInputBlur()\"\n (click)=\"handleClick()\"\n (onValueChanged)=\"textChange($event)\"\n ></ax-text-box>\n </ng-container>\n <ng-container panel>\n @if (_renderPicker) {\n <ax-calendar-box\n #calendarRef\n [showTodayButton]=\"showTodayButton\"\n [selectableHoliday]=\"selectableHoliday\"\n [min]=\"min()\"\n [max]=\"max()\"\n [size]=\"size\"\n (onClick)=\"onClick($event)\"\n (onValueChanged)=\"onDateChange($event)\"\n [type]=\"type\"\n [(value)]=\"calendarValue\"\n [dayStyle]=\"dayStyle\"\n [dayMinMaxResoan]=\"dayMinMaxResoan\"\n >\n </ax-calendar-box>\n }\n </ng-container>\n <ng-container end>\n <ax-button\n end\n *ngIf=\"allowClear && value\"\n [disabled]=\"disabled\"\n icon=\"far fa-times icon\"\n type=\"blank danger\"\n (click)=\"clearTextBox()\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n end\n icon=\"far fa-calendar-alt icon\"\n type=\"light blank\"\n (click)=\"handleButtonClick()\"\n [disabled]=\"disabled\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n ></ax-button>\n <ng-content select=\"[end]\"> </ng-content>\n </ng-container>\n</ax-drop-down>\n", styles: [".ax-dropdown-container-bordered .ax-calendar-container{border:none!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AXDropdownComponent, selector: "ax-drop-down", inputs: ["rtl", "readonly", "loading", "dropdownWidth"], outputs: ["dropdownToggle", "onButtonClick"] }, { kind: "component", type: AXCalendarBoxComponent, selector: "ax-calendar-box", inputs: ["size", "type", "locale", "dir", "min", "max", "selectableHoliday", "dayStyle", "dayMinMaxResoan", "showTodayButton", "view", "depth", "value"], outputs: ["onValueChanged", "onClick", "valueChange"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }, { kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions", "leadZeroDateTime"] }], encapsulation: i0.ViewEncapsulation.None });
5153
5144
  }
5154
5145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXDatePickerComponent, decorators: [{
5155
5146
  type: Component,
5156
5147
  args: [{ selector: 'ax-date-picker', encapsulation: ViewEncapsulation.None, providers: [
5157
5148
  { provide: AXValidatableComponent, useExisting: AXDatePickerComponent },
5158
- ], host: { style: 'width: 100%' }, standalone: false, template: "<ax-drop-down\n [readonly]=\"readonly\"\n [fitParent]=\"false\"\n [size]=\"size\"\n [showDropDownButton]=\"false\"\n icon=\"far fa-calendar-alt\"\n #dropdown\n maxHeight=\"unset\"\n>\n <ng-container start>\n <ng-content select=\"[start]\"> </ng-content>\n </ng-container>\n <ng-container header>\n <ax-text-box\n [mask]=\"dateType\"\n [showMask]=\"true\"\n #input\n [textAlign]=\"textAlign\"\n [value]=\"text\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [size]=\"size\"\n (onBlur)=\"handleInputBlur()\"\n (click)=\"handleClick()\"\n (onValueChanged)=\"textChange($event)\"\n ></ax-text-box>\n </ng-container>\n <ng-container panel>\n @if (_renderPicker) {\n <ax-calendar-box\n #calendarRef\n [showTodayButton]=\"showTodayButton\"\n [selectableHoliday]=\"selectableHoliday\"\n [min]=\"min()\"\n [max]=\"max()\"\n [size]=\"size\"\n (onClick)=\"onClick($event)\"\n (onValueChanged)=\"onDateChange($event)\"\n [type]=\"type\"\n [(value)]=\"calendarValue\"\n [dayStyle]=\"dayStyle\"\n [dayMinMaxResoan]=\"dayMinMaxResoan\"\n >\n </ax-calendar-box>\n }\n </ng-container>\n <ng-container end>\n <ax-button\n end\n *ngIf=\"allowClear && value\"\n [disabled]=\"disabled\"\n icon=\"far fa-times icon\"\n type=\"blank danger\"\n (click)=\"clearTextBox()\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n end\n icon=\"far fa-calendar-alt icon\"\n type=\"light blank\"\n (click)=\"handleButtonClick()\"\n [disabled]=\"disabled\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n ></ax-button>\n <ng-content select=\"[end]\"> </ng-content>\n </ng-container>\n</ax-drop-down>\n", styles: [".ax-dropdown-container-bordered .ax-calendar-container{border:none!important}\n"] }]
5149
+ ], host: { style: 'width: 100%' }, standalone: false, template: "<ax-drop-down\n [readonly]=\"readonly\"\n [fitParent]=\"false\"\n [size]=\"size\"\n [showDropDownButton]=\"false\"\n icon=\"far fa-calendar-alt\"\n #dropdown\n maxHeight=\"unset\"\n>\n <ng-container start>\n <ng-content select=\"[start]\"> </ng-content>\n </ng-container>\n <ng-container header>\n <ax-text-box\n [mask]=\"dateType\"\n [showMask]=\"true\"\n #input\n [textAlign]=\"textAlign\"\n [value]=\"text\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [size]=\"size\"\n (onkey)=\"handleKeyPress($event)\"\n (onBlur)=\"handleInputBlur()\"\n (click)=\"handleClick()\"\n (onValueChanged)=\"textChange($event)\"\n ></ax-text-box>\n </ng-container>\n <ng-container panel>\n @if (_renderPicker) {\n <ax-calendar-box\n #calendarRef\n [showTodayButton]=\"showTodayButton\"\n [selectableHoliday]=\"selectableHoliday\"\n [min]=\"min()\"\n [max]=\"max()\"\n [size]=\"size\"\n (onClick)=\"onClick($event)\"\n (onValueChanged)=\"onDateChange($event)\"\n [type]=\"type\"\n [(value)]=\"calendarValue\"\n [dayStyle]=\"dayStyle\"\n [dayMinMaxResoan]=\"dayMinMaxResoan\"\n >\n </ax-calendar-box>\n }\n </ng-container>\n <ng-container end>\n <ax-button\n end\n *ngIf=\"allowClear && value\"\n [disabled]=\"disabled\"\n icon=\"far fa-times icon\"\n type=\"blank danger\"\n (click)=\"clearTextBox()\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n end\n icon=\"far fa-calendar-alt icon\"\n type=\"light blank\"\n (click)=\"handleButtonClick()\"\n [disabled]=\"disabled\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n ></ax-button>\n <ng-content select=\"[end]\"> </ng-content>\n </ng-container>\n</ax-drop-down>\n", styles: [".ax-dropdown-container-bordered .ax-calendar-container{border:none!important}\n"] }]
5159
5150
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { dropdown: [{
5160
5151
  type: ViewChild,
5161
5152
  args: ['dropdown', { static: true }]