PDF Form Script Calculate difference between 2 given DATES and display the result in DAYS

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 15

  • @vakeroufo
    @vakeroufo Год назад +1

    Muchas gracias, fue de mucha utilidad.

  • @jerryowens5622
    @jerryowens5622 2 месяца назад

    I followed the script but nothing show in the field

  • @Abdulbaqi8
    @Abdulbaqi8 2 года назад

    thank you but please need code for color the weekends ,Friday & Saturday when i choose (the date from format)

  • @CapixabaVistodeCima
    @CapixabaVistodeCima 3 года назад

    Great video

  • @snehasri1019
    @snehasri1019 2 года назад

    Hi, Thanks for the video exactly I'm also looking for the same. It is not showing any errors for me, but script not working result not showing anything. How can i fix it

    • @pdfform
      @pdfform  2 года назад

      working pdf file is available on our patreon page

    • @subratparida143
      @subratparida143 10 месяцев назад

      Sir same issue

  • @bipsbd
    @bipsbd 10 месяцев назад

    Dear can you help me out plz
    if (d2 == dd2.defaultValue || d1 == dd1.defaultValue){event.value = " " ;};
    Syntax Error : Missing ) after condition 9: at line 10

  • @eman7107
    @eman7107 Год назад

    I tried the code and it not showing me any error or the results but I'm using the drop-down calendar for the date value

    • @raavan_6845
      @raavan_6845 Год назад

      Did u find any solution?

    • @argintorosian4370
      @argintorosian4370 11 месяцев назад +1

      I tried the following and it worked on drop-down calendar
      var dd = this.getField("departure date").value;
      var rd = this.getField("return date").value;
      var d1 = util.scand("mm/dd/yy", dd);
      var d2 = util.scand("mm/dd/yy", rd);
      var diff = (d2.valueOf() - d1.valueOf()) / 1000;
      event.value = Math.round((diff / 60 / 60) / 24);
      Just change the Departure date and return date.

    • @argintorosian4370
      @argintorosian4370 11 месяцев назад

      @@raavan_6845
      I tried the following and it worked on drop-down calendar
      var dd = this.getField("departure date").value;
      var rd = this.getField("return date").value;
      var d1 = util.scand("mm/dd/yy", dd);
      var d2 = util.scand("mm/dd/yy", rd);
      var diff = (d2.valueOf() - d1.valueOf()) / 1000;
      event.value = Math.round((diff / 60 / 60) / 24);
      Just change the Departure date and return date.

  • @mspoolat
    @mspoolat 3 года назад

    Dear Sir, pls help me to solve this problem below:-
    if(d2 != dd2.defaultValue && d1 != dd1.defaultValue) {event.value = Math.floor(diff/oneDay)+ " Day(s)" ;);
    showing (Syntax Error 14: at line 15

    • @pdfform
      @pdfform  3 года назад

      @Salim Poolat the last bracket will be } not )
      if(d2 != dd2.defaultValue && d1 != dd1.defaultValue) {event.value = Math.floor(diff/oneDay)+ " Day(s)" ;}

    • @mspoolat
      @mspoolat 3 года назад

      thank you very much Sir..