Author Topic: Regular Expression Pattern for Validation of Values  (Read 5471 times)

Offline dodgeviper12003

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Regular Expression Pattern for Validation of Values
« on: June 01, 2015, 09:26:08 PM »
Hi, I installed the extension Order Attributes and I chose a date attribute. I need help to create a Regular Expression Pattern for Validation of Values so that people can not choose a weekend. I am not familiar with php coding so I do not know how to code this. If someone could help this would be greatly appreciated.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Regular Expression Pattern for Validation of Values
« Reply #1 on: June 03, 2015, 08:50:10 AM »
You can not to realize a weekend checker with regular expression pattern. It's helpful only for format of string checks.
i suggest to look into jquery datepicker settings to forbid weekend days chosing.

Try to google fo it..
For ex http://webtricksandtreats.com/disable-specific-days-jquery-ui-date-picker/

You can add disabling function on page with attributes or add this globally into view/template/.../forms/date.tpl
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod