Jump to content
netcarver

Module: FieldtypeTime & InputfieldTime

Recommended Posts

Selamat Pagi. Khabar baik tuan Steve!

Thanks for the reply!

Look forward to you figuring it out whenever your free next.

Till then...

Cheers!

 

Share this post


Link to post
Share on other sites
2 hours ago, Zahari Majini said:

Khabar baik tuan Steve!

Tuan? Saya? :undecided:  Terimah Kasih, tetapi "Steve" cukup baik. :)

</offtopic>

Share this post


Link to post
Share on other sites

@Zahari Majini Could you let me know...

  1. which time format you are using for your input? (From the details tab of your time field.)
  2. if you have the picker inhibited? (Look on the input tab of your time field.)

timepicker-00.png  timepicker-01.png

 

Thank you!

Share this post


Link to post
Share on other sites

Hi Steve

Time format is Hours (0-24) & minutes (00-59)

Picker is unchecked or not inhibited. Works fine on a regular page. Just not in a repeater matrix.

Terima kasih!

Share this post


Link to post
Share on other sites

@Zahari Majini

It appears to be the same issue as reported here. For now, you can work around it by changing the settings for your repeater matrix to the following...

timepicker-02.png

Not the most satisfactory of results. Note, doesn't work well enough if you simply switch the Ajax option to off as the picker appears on all the fields as soon as you open the owning entry.

  • Like 2

Share this post


Link to post
Share on other sites

Hi Steve!

Thanks so much for all the effort you have put into this!

I will check out the thread you linked to to learn more.

Many thanks again!

 

 

 

Share this post


Link to post
Share on other sites

Hi Steve

Thanks so much again for looking into this. Unfortunately after trying the dev version, i think it's made things worse. At least for me. The clock picker has now stopped working on both a "normal simple" page and within a repeater matrix. Replacing it with the previous main one restored back the clock picker on the "normal" page....

Share this post


Link to post
Share on other sites

@Zahari Majini

Ok, that's unexpected. My local install (3.0.36) has it working in normal contexts as well as repeater-matrix contexts. Did you overwrite the InputfieldTime.module file with the new one?

Any chance you can PM me login details to allow me to try and trace what is happening on your installation?

Regards, Steve

  • Like 1

Share this post


Link to post
Share on other sites

Hi Steve

Actually the site is on local host in MAMP Pro.

I will upload it to a live site over the weekend and pass you the login details so you can have a dig!

But now that you mention it mine is 3.0.38. Hmmm. Will rollback too and see!

 

Cheers!

Share this post


Link to post
Share on other sites

Thanks Steve!!

Fabulous module indeed!

^-^

Curious now... what were the jobs or the needs you had that made you make it?

Share this post


Link to post
Share on other sites
On 16.6.2015 at 0:18 AM, netcarver said:

@Beluga, @Juergen

Thanks for pressing me on this. I've just been testing this in PhpMyAdmin and there seems to be a problem with trying to set a blank value to MySQL time fields; MySQL itself sees the blank as an invalid time and sets it to '00:00:00'. There is some more detail about this in the MySQL Time type manual page. Here's a quote from the linked manual page...

You could setup your own test table with a TIME field and try it yourself. Please let me know if you find a workable solution and I'll try and work it into the module. At this point in time I'm not sure how to prevent PW from trying to save a blank value into the DB if nothing is entered in the Inputfield.

Why don't you insert a NULL value for the time if it's left blank? This should work perfectly with MySQL.

Apart from that, thanks a lot for the module, but the blank problem is also essential for me, so I really would appreciate a solution  :-)

Share this post


Link to post
Share on other sites

@FlorianA Sorry for the delay on this. I've been away from the keyboard over the summer holidays and must have missed the notification email from the forum about your post here.

Looking at this now.

Share this post


Link to post
Share on other sites

Hi @netcarver great module! Something I'm not sure how to do or if I missed the option: With date time fields from PW you get the option to format the output based on the language. Is this also possible with your plugin? Seems I can't find the option…

59ddfc4422a4e_ScreenShot2017-10-11at13_10_33.png.58e32b44ab43a38481e5c16dfcb92959.png

Share this post


Link to post
Share on other sites
On 28.9.2017 at 3:53 PM, netcarver said:

I've now merged FlorianA's patch into the allow-blanks branch. Please test and let me know if it works for you.

I am using it too and I have not detected any problems since then.

  • Like 1

Share this post


Link to post
Share on other sites

Hey @netcarver - using this for the first time - very handy, thank you!

Just wondering if the field should be blank by default, rather than 00:00:00 ? I want to check to see if a time has been entered, but the way things are, it doesn't seem possible. I am doing the check against 00:00:00 but of course that is a valid time (fortunately not one that anyone would enter in my case, but in some others in certainly would be).

Thanks.

EDIT: Oops, looks like @FlorianA is already on this :) Anyway, looking forward to seeing that merged!

Share this post


Link to post
Share on other sites

Actually, what do you guys @netcarver @FlorianA @bernhard think about putting 00:00:00 in the placeholder attribute - that way editors know what format to enter, but the value is still blank.

  • Like 2

Share this post


Link to post
Share on other sites

@adrian

Thanks for the feedback - I like the idea. It needs a take account of the chosen time format (that's just one of the ones on offer), but this should be possible. Will see what I can do.

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-10-18
      2019-08-08
      2019-06-15
      2019-06-02
      2019-05-25
      If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




    • By eelkenet
      Hi! I've created a small Inputfield module called InputfieldFloatRange which allows you to use an HTML5 <input type="range" ../> slider as an InputField. I needed something like this for a project where the client needs to be able to tweak this value more based on 'a feeling' than just entering a boring old number. Maybe more people can use this so I'm hereby releasing it into the wild.  
       
      What is it?
      The missing range slider Inputfield for Processwire. 
      What does it do?
      This module extends InputfieldFloat and allows you to use HTML5 range sliders for number fields in your templates.
      It includes a visible and editable value field, to override/tweak the value if required.  
      Features
      Min/max values Precision (number of decimals) Steps (Read more) Manual override of the selected value (will still adhere to the rules above) Usage
      Clone / zip repo Install FieldtypeFloatRange, this automatically installs the Inputfield Create new field of type `Float (range)` or convert an existing `Float`, `Integer` or `Text` field. To render the field's value simply echo `$page->field` Demo
      A field with Min=0, Max=1, Step=0.2, Precision=2

      Field with settings Min=0, Max=200, Step=0.25, Precision=2

       
      Todo
      Make the display-field's size configurable (will use the Input Size field setting)  Hopefully become redundant If it's usable for others I'll add it to the Modules list  
      Changelog
      v002
      - Fix issue where setting the step value to an empty value created problem with validation
      - Make the display-field optional 
      v001
      - Initial release
       
      Thanks!
       
       
    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. Field widths entered into the Template Field Widths inputfield are only applied if the Edit Template form is submitted with the Template Field Widths inputfield in an opened state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By adrian
      Tracy Debugger for ProcessWire
      The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS

       
      Integrates and extends Nette's Tracy debugging tool and adds 35+ custom tools designed for effective ProcessWire debugging and lightning fast development
      The most comprehensive set of instructions and examples is available at: https://adrianbj.github.io/TracyDebugger
      Modules Directory: http://modules.processwire.com/modules/tracy-debugger/
      Github: https://github.com/adrianbj/TracyDebugger
      A big thanks to @tpr for introducing me to Tracy and for the idea for this module and for significant feedback, testing, and feature suggestions.
×
×
  • Create New...